generated-configure.sh revision 1850:f0117f6e5234
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
691ZIP_DEBUGINFO_FILES
692ENABLE_DEBUG_SYMBOLS
693STRIP_POLICY
694DEBUG_BINARIES
695NATIVE_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
790ac_ct_PROPER_COMPILER_CXX
791PROPER_COMPILER_CXX
792TOOLCHAIN_PATH_CXX
793POTENTIAL_CXX
794OBJEXT
795EXEEXT
796ac_ct_CC
797CPPFLAGS
798LDFLAGS
799CFLAGS
800CC
801ac_ct_PROPER_COMPILER_CC
802PROPER_COMPILER_CC
803TOOLCHAIN_PATH_CC
804POTENTIAL_CC
805TOOLCHAIN_VERSION
806VS_LIB
807VS_INCLUDE
808VS_PATH
809CYGWIN_LINK
810SYSROOT_LDFLAGS
811SYSROOT_CFLAGS
812LEGACY_EXTRA_LDFLAGS
813LEGACY_EXTRA_CXXFLAGS
814LEGACY_EXTRA_CFLAGS
815EXE_SUFFIX
816OBJ_SUFFIX
817STATIC_LIBRARY
818SHARED_LIBRARY
819STATIC_LIBRARY_SUFFIX
820SHARED_LIBRARY_SUFFIX
821LIBRARY_PREFIX
822TOOLCHAIN_TYPE
823STATIC_BUILD
824BUILD_HOTSPOT
825HOTSPOT_DIST
826BUILD_OUTPUT
827JDK_TOPDIR
828NASHORN_TOPDIR
829HOTSPOT_TOPDIR
830JAXWS_TOPDIR
831JAXP_TOPDIR
832CORBA_TOPDIR
833LANGTOOLS_TOPDIR
834BOOT_JDK_BITS
835JAVAC_FLAGS
836BOOT_JDK_SOURCETARGET
837JARSIGNER
838JAR
839JAVAH
840JAVAC
841JAVA
842BOOT_JDK
843JAVA_CHECK
844JAVAC_CHECK
845VERSION_IS_GA
846VERSION_SHORT
847VERSION_STRING
848VERSION_NUMBER_FOUR_POSITIONS
849VERSION_NUMBER
850VERSION_OPT
851VERSION_BUILD
852VERSION_PRE
853VERSION_PATCH
854VERSION_SECURITY
855VERSION_MINOR
856VERSION_MAJOR
857MACOSX_BUNDLE_ID_BASE
858MACOSX_BUNDLE_NAME_BASE
859COMPANY_NAME
860JDK_RC_PLATFORM_NAME
861PRODUCT_SUFFIX
862PRODUCT_NAME
863LAUNCHER_NAME
864TEST_IN_BUILD
865COPYRIGHT_YEAR
866COMPRESS_JARS
867UNLIMITED_CRYPTO
868CACERTS_FILE
869BUILD_HEADLESS
870SUPPORT_HEADFUL
871SUPPORT_HEADLESS
872DEFAULT_MAKE_TARGET
873OS_VERSION_MICRO
874OS_VERSION_MINOR
875OS_VERSION_MAJOR
876PKG_CONFIG
877BASH_ARGS
878SETFILE
879CODESIGN
880XATTR
881DSYMUTIL
882IS_GNU_TIME
883PATCH
884TIME
885STAT
886HG
887READELF
888OTOOL
889LDD
890ZIP
891UNZIP
892FIND_DELETE
893OUTPUT_SYNC
894OUTPUT_SYNC_SUPPORTED
895CHECK_TOOLSDIR_MAKE
896CHECK_TOOLSDIR_GMAKE
897CHECK_MAKE
898CHECK_GMAKE
899MAKE
900PKGHANDLER
901CONFIGURESUPPORT_OUTPUTDIR
902OUTPUT_ROOT
903CONF_NAME
904SPEC
905SDKROOT
906XCODEBUILD
907BUILD_VARIANT_RELEASE
908DEBUG_CLASSFILES
909FASTDEBUG
910VARIANT
911DEBUG_LEVEL
912MACOSX_UNIVERSAL
913INCLUDE_SA
914JVM_VARIANT_CORE
915JVM_VARIANT_ZEROSHARK
916JVM_VARIANT_ZERO
917JVM_VARIANT_MINIMAL1
918JVM_VARIANT_CLIENT
919JVM_VARIANT_SERVER
920JVM_VARIANTS
921JVM_INTERPRETER
922JDK_VARIANT
923SET_OPENJDK
924CANONICAL_TOPDIR
925ORIGINAL_TOPDIR
926TOPDIR
927PATH_SEP
928ZERO_ARCHDEF
929DEFINE_CROSS_COMPILE_ARCH
930LP64
931OPENJDK_TARGET_OS_EXPORT_DIR
932OPENJDK_TARGET_CPU_JLI_CFLAGS
933OPENJDK_TARGET_CPU_OSARCH
934OPENJDK_TARGET_CPU_ISADIR
935OPENJDK_TARGET_CPU_LIBDIR
936OPENJDK_TARGET_CPU_LEGACY_LIB
937OPENJDK_TARGET_CPU_LEGACY
938REQUIRED_OS_VERSION
939REQUIRED_OS_NAME
940COMPILE_TYPE
941OPENJDK_TARGET_CPU_ENDIAN
942OPENJDK_TARGET_CPU_BITS
943OPENJDK_TARGET_CPU_ARCH
944OPENJDK_TARGET_CPU
945OPENJDK_TARGET_OS_ENV
946OPENJDK_TARGET_OS_TYPE
947OPENJDK_TARGET_OS
948OPENJDK_BUILD_CPU_ENDIAN
949OPENJDK_BUILD_CPU_BITS
950OPENJDK_BUILD_CPU_ARCH
951OPENJDK_BUILD_CPU
952OPENJDK_BUILD_OS_ENV
953OPENJDK_BUILD_OS_TYPE
954OPENJDK_BUILD_OS
955OPENJDK_BUILD_AUTOCONF_NAME
956OPENJDK_TARGET_AUTOCONF_NAME
957target_os
958target_vendor
959target_cpu
960target
961host_os
962host_vendor
963host_cpu
964host
965build_os
966build_vendor
967build_cpu
968build
969NICE
970CPIO
971DF
972READLINK
973CYGPATH
974SED
975FGREP
976EGREP
977GREP
978AWK
979XARGS
980WHICH
981WC
982UNIQ
983UNAME
984TR
985TOUCH
986TEE
987TAR
988TAIL
989SORT
990SH
991RMDIR
992RM
993PRINTF
994NAWK
995MV
996MKTEMP
997MKDIR
998LS
999LN
1000HEAD
1001FIND
1002FILE
1003EXPR
1004ECHO
1005DIRNAME
1006DIFF
1007DATE
1008CUT
1009CP
1010COMM
1011CMP
1012CHMOD
1013CAT
1014BASH
1015BASENAME
1016DATE_WHEN_CONFIGURED
1017ORIGINAL_PATH
1018CONFIGURE_COMMAND_LINE
1019target_alias
1020host_alias
1021build_alias
1022LIBS
1023ECHO_T
1024ECHO_N
1025ECHO_C
1026DEFS
1027mandir
1028localedir
1029libdir
1030psdir
1031pdfdir
1032dvidir
1033htmldir
1034infodir
1035docdir
1036oldincludedir
1037includedir
1038localstatedir
1039sharedstatedir
1040sysconfdir
1041datadir
1042datarootdir
1043libexecdir
1044sbindir
1045bindir
1046program_transform_name
1047prefix
1048exec_prefix
1049PACKAGE_URL
1050PACKAGE_BUGREPORT
1051PACKAGE_STRING
1052PACKAGE_VERSION
1053PACKAGE_TARNAME
1054PACKAGE_NAME
1055PATH_SEPARATOR
1056SHELL'
1057ac_subst_files=''
1058ac_user_opts='
1059enable_option_checking
1060with_target_bits
1061enable_openjdk_only
1062with_custom_make_dir
1063with_jdk_variant
1064with_jvm_interpreter
1065with_jvm_variants
1066enable_debug
1067with_debug_level
1068with_devkit
1069with_sys_root
1070with_sysroot
1071with_tools_dir
1072with_toolchain_path
1073with_extra_path
1074with_sdk_name
1075with_conf_name
1076with_output_sync
1077with_default_make_target
1078enable_headful
1079with_cacerts_file
1080enable_unlimited_crypto
1081with_copyright_year
1082enable_hotspot_test_in_build
1083with_milestone
1084with_update_version
1085with_user_release_suffix
1086with_build_number
1087with_version_string
1088with_version_pre
1089with_version_opt
1090with_version_build
1091with_version_major
1092with_version_minor
1093with_version_security
1094with_version_patch
1095with_boot_jdk
1096with_add_source_root
1097with_override_source_root
1098with_adds_and_overrides
1099with_override_langtools
1100with_override_corba
1101with_override_jaxp
1102with_override_jaxws
1103with_override_hotspot
1104with_override_nashorn
1105with_override_jdk
1106with_import_hotspot
1107enable_static_build
1108with_toolchain_type
1109with_extra_cflags
1110with_extra_cxxflags
1111with_extra_ldflags
1112with_toolchain_version
1113with_build_devkit
1114with_jtreg
1115enable_warnings_as_errors
1116with_native_debug_symbols
1117enable_debug_symbols
1118enable_zip_debug_info
1119enable_native_coverage
1120with_stdc__lib
1121with_msvcr_dll
1122with_msvcp_dll
1123with_x
1124with_cups
1125with_cups_include
1126with_freetype
1127with_freetype_include
1128with_freetype_lib
1129with_freetype_src
1130enable_freetype_bundling
1131with_alsa
1132with_alsa_include
1133with_alsa_lib
1134with_libffi
1135with_libffi_include
1136with_libffi_lib
1137with_libjpeg
1138with_giflib
1139with_libpng
1140with_zlib
1141with_lcms
1142with_dxsdk
1143with_dxsdk_lib
1144with_dxsdk_include
1145with_num_cores
1146with_memory_size
1147with_jobs
1148with_test_jobs
1149with_boot_jdk_jvmargs
1150with_sjavac_server_java
1151enable_sjavac
1152enable_javac_server
1153enable_icecc
1154enable_precompiled_headers
1155enable_ccache
1156with_ccache_dir
1157'
1158      ac_precious_vars='build_alias
1159host_alias
1160target_alias
1161BASENAME
1162BASH
1163CAT
1164CHMOD
1165CMP
1166COMM
1167CP
1168CUT
1169DATE
1170DIFF
1171DIRNAME
1172ECHO
1173EXPR
1174FILE
1175FIND
1176HEAD
1177LN
1178LS
1179MKDIR
1180MKTEMP
1181MV
1182NAWK
1183PRINTF
1184RM
1185RMDIR
1186SH
1187SORT
1188TAIL
1189TAR
1190TEE
1191TOUCH
1192TR
1193UNAME
1194UNIQ
1195WC
1196WHICH
1197XARGS
1198AWK
1199GREP
1200EGREP
1201FGREP
1202SED
1203CYGPATH
1204READLINK
1205DF
1206CPIO
1207NICE
1208MAKE
1209UNZIP
1210ZIP
1211LDD
1212OTOOL
1213READELF
1214HG
1215STAT
1216TIME
1217PATCH
1218DSYMUTIL
1219XATTR
1220CODESIGN
1221SETFILE
1222PKG_CONFIG
1223JAVA
1224JAVAC
1225JAVAH
1226JAR
1227JARSIGNER
1228CC
1229CFLAGS
1230LDFLAGS
1231LIBS
1232CPPFLAGS
1233CXX
1234CXXFLAGS
1235CCC
1236CPP
1237CXXCPP
1238AS
1239AR
1240LIPO
1241STRIP
1242NM
1243GNM
1244OBJCOPY
1245OBJDUMP
1246BUILD_CC
1247BUILD_CXX
1248BUILD_NM
1249BUILD_AR
1250JTREGEXE
1251XMKMF
1252FREETYPE_CFLAGS
1253FREETYPE_LIBS
1254ALSA_CFLAGS
1255ALSA_LIBS
1256LIBFFI_CFLAGS
1257LIBFFI_LIBS
1258PNG_CFLAGS
1259PNG_LIBS
1260LCMS_CFLAGS
1261LCMS_LIBS
1262ICECC_CMD
1263ICECC_CREATE_ENV
1264ICECC_WRAPPER
1265CCACHE'
1266
1267
1268# Initialize some variables set by options.
1269ac_init_help=
1270ac_init_version=false
1271ac_unrecognized_opts=
1272ac_unrecognized_sep=
1273# The variables have the same names as the options, with
1274# dashes changed to underlines.
1275cache_file=/dev/null
1276exec_prefix=NONE
1277no_create=
1278no_recursion=
1279prefix=NONE
1280program_prefix=NONE
1281program_suffix=NONE
1282program_transform_name=s,x,x,
1283silent=
1284site=
1285srcdir=
1286verbose=
1287x_includes=NONE
1288x_libraries=NONE
1289
1290# Installation directory options.
1291# These are left unexpanded so users can "make install exec_prefix=/foo"
1292# and all the variables that are supposed to be based on exec_prefix
1293# by default will actually change.
1294# Use braces instead of parens because sh, perl, etc. also accept them.
1295# (The list follows the same order as the GNU Coding Standards.)
1296bindir='${exec_prefix}/bin'
1297sbindir='${exec_prefix}/sbin'
1298libexecdir='${exec_prefix}/libexec'
1299datarootdir='${prefix}/share'
1300datadir='${datarootdir}'
1301sysconfdir='${prefix}/etc'
1302sharedstatedir='${prefix}/com'
1303localstatedir='${prefix}/var'
1304includedir='${prefix}/include'
1305oldincludedir='/usr/include'
1306docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1307infodir='${datarootdir}/info'
1308htmldir='${docdir}'
1309dvidir='${docdir}'
1310pdfdir='${docdir}'
1311psdir='${docdir}'
1312libdir='${exec_prefix}/lib'
1313localedir='${datarootdir}/locale'
1314mandir='${datarootdir}/man'
1315
1316ac_prev=
1317ac_dashdash=
1318for ac_option
1319do
1320  # If the previous option needs an argument, assign it.
1321  if test -n "$ac_prev"; then
1322    eval $ac_prev=\$ac_option
1323    ac_prev=
1324    continue
1325  fi
1326
1327  case $ac_option in
1328  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1329  *=)   ac_optarg= ;;
1330  *)    ac_optarg=yes ;;
1331  esac
1332
1333  # Accept the important Cygnus configure options, so we can diagnose typos.
1334
1335  case $ac_dashdash$ac_option in
1336  --)
1337    ac_dashdash=yes ;;
1338
1339  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1340    ac_prev=bindir ;;
1341  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1342    bindir=$ac_optarg ;;
1343
1344  -build | --build | --buil | --bui | --bu)
1345    ac_prev=build_alias ;;
1346  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1347    build_alias=$ac_optarg ;;
1348
1349  -cache-file | --cache-file | --cache-fil | --cache-fi \
1350  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1351    ac_prev=cache_file ;;
1352  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1353  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1354    cache_file=$ac_optarg ;;
1355
1356  --config-cache | -C)
1357    cache_file=config.cache ;;
1358
1359  -datadir | --datadir | --datadi | --datad)
1360    ac_prev=datadir ;;
1361  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1362    datadir=$ac_optarg ;;
1363
1364  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1365  | --dataroo | --dataro | --datar)
1366    ac_prev=datarootdir ;;
1367  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1368  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1369    datarootdir=$ac_optarg ;;
1370
1371  -disable-* | --disable-*)
1372    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1373    # Reject names that are not valid shell variable names.
1374    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1375      as_fn_error $? "invalid feature name: $ac_useropt"
1376    ac_useropt_orig=$ac_useropt
1377    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1378    case $ac_user_opts in
1379      *"
1380"enable_$ac_useropt"
1381"*) ;;
1382      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1383	 ac_unrecognized_sep=', ';;
1384    esac
1385    eval enable_$ac_useropt=no ;;
1386
1387  -docdir | --docdir | --docdi | --doc | --do)
1388    ac_prev=docdir ;;
1389  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1390    docdir=$ac_optarg ;;
1391
1392  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1393    ac_prev=dvidir ;;
1394  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1395    dvidir=$ac_optarg ;;
1396
1397  -enable-* | --enable-*)
1398    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1399    # Reject names that are not valid shell variable names.
1400    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1401      as_fn_error $? "invalid feature name: $ac_useropt"
1402    ac_useropt_orig=$ac_useropt
1403    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1404    case $ac_user_opts in
1405      *"
1406"enable_$ac_useropt"
1407"*) ;;
1408      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1409	 ac_unrecognized_sep=', ';;
1410    esac
1411    eval enable_$ac_useropt=\$ac_optarg ;;
1412
1413  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1414  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1415  | --exec | --exe | --ex)
1416    ac_prev=exec_prefix ;;
1417  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1418  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1419  | --exec=* | --exe=* | --ex=*)
1420    exec_prefix=$ac_optarg ;;
1421
1422  -gas | --gas | --ga | --g)
1423    # Obsolete; use --with-gas.
1424    with_gas=yes ;;
1425
1426  -help | --help | --hel | --he | -h)
1427    ac_init_help=long ;;
1428  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1429    ac_init_help=recursive ;;
1430  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1431    ac_init_help=short ;;
1432
1433  -host | --host | --hos | --ho)
1434    ac_prev=host_alias ;;
1435  -host=* | --host=* | --hos=* | --ho=*)
1436    host_alias=$ac_optarg ;;
1437
1438  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1439    ac_prev=htmldir ;;
1440  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1441  | --ht=*)
1442    htmldir=$ac_optarg ;;
1443
1444  -includedir | --includedir | --includedi | --included | --include \
1445  | --includ | --inclu | --incl | --inc)
1446    ac_prev=includedir ;;
1447  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1448  | --includ=* | --inclu=* | --incl=* | --inc=*)
1449    includedir=$ac_optarg ;;
1450
1451  -infodir | --infodir | --infodi | --infod | --info | --inf)
1452    ac_prev=infodir ;;
1453  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1454    infodir=$ac_optarg ;;
1455
1456  -libdir | --libdir | --libdi | --libd)
1457    ac_prev=libdir ;;
1458  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1459    libdir=$ac_optarg ;;
1460
1461  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1462  | --libexe | --libex | --libe)
1463    ac_prev=libexecdir ;;
1464  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1465  | --libexe=* | --libex=* | --libe=*)
1466    libexecdir=$ac_optarg ;;
1467
1468  -localedir | --localedir | --localedi | --localed | --locale)
1469    ac_prev=localedir ;;
1470  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1471    localedir=$ac_optarg ;;
1472
1473  -localstatedir | --localstatedir | --localstatedi | --localstated \
1474  | --localstate | --localstat | --localsta | --localst | --locals)
1475    ac_prev=localstatedir ;;
1476  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1477  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1478    localstatedir=$ac_optarg ;;
1479
1480  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1481    ac_prev=mandir ;;
1482  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1483    mandir=$ac_optarg ;;
1484
1485  -nfp | --nfp | --nf)
1486    # Obsolete; use --without-fp.
1487    with_fp=no ;;
1488
1489  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1490  | --no-cr | --no-c | -n)
1491    no_create=yes ;;
1492
1493  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1494  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1495    no_recursion=yes ;;
1496
1497  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1498  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1499  | --oldin | --oldi | --old | --ol | --o)
1500    ac_prev=oldincludedir ;;
1501  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1502  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1503  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1504    oldincludedir=$ac_optarg ;;
1505
1506  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1507    ac_prev=prefix ;;
1508  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1509    prefix=$ac_optarg ;;
1510
1511  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1512  | --program-pre | --program-pr | --program-p)
1513    ac_prev=program_prefix ;;
1514  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1515  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1516    program_prefix=$ac_optarg ;;
1517
1518  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1519  | --program-suf | --program-su | --program-s)
1520    ac_prev=program_suffix ;;
1521  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1522  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1523    program_suffix=$ac_optarg ;;
1524
1525  -program-transform-name | --program-transform-name \
1526  | --program-transform-nam | --program-transform-na \
1527  | --program-transform-n | --program-transform- \
1528  | --program-transform | --program-transfor \
1529  | --program-transfo | --program-transf \
1530  | --program-trans | --program-tran \
1531  | --progr-tra | --program-tr | --program-t)
1532    ac_prev=program_transform_name ;;
1533  -program-transform-name=* | --program-transform-name=* \
1534  | --program-transform-nam=* | --program-transform-na=* \
1535  | --program-transform-n=* | --program-transform-=* \
1536  | --program-transform=* | --program-transfor=* \
1537  | --program-transfo=* | --program-transf=* \
1538  | --program-trans=* | --program-tran=* \
1539  | --progr-tra=* | --program-tr=* | --program-t=*)
1540    program_transform_name=$ac_optarg ;;
1541
1542  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1543    ac_prev=pdfdir ;;
1544  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1545    pdfdir=$ac_optarg ;;
1546
1547  -psdir | --psdir | --psdi | --psd | --ps)
1548    ac_prev=psdir ;;
1549  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1550    psdir=$ac_optarg ;;
1551
1552  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1553  | -silent | --silent | --silen | --sile | --sil)
1554    silent=yes ;;
1555
1556  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1557    ac_prev=sbindir ;;
1558  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1559  | --sbi=* | --sb=*)
1560    sbindir=$ac_optarg ;;
1561
1562  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1563  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1564  | --sharedst | --shareds | --shared | --share | --shar \
1565  | --sha | --sh)
1566    ac_prev=sharedstatedir ;;
1567  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1568  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1569  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1570  | --sha=* | --sh=*)
1571    sharedstatedir=$ac_optarg ;;
1572
1573  -site | --site | --sit)
1574    ac_prev=site ;;
1575  -site=* | --site=* | --sit=*)
1576    site=$ac_optarg ;;
1577
1578  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1579    ac_prev=srcdir ;;
1580  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1581    srcdir=$ac_optarg ;;
1582
1583  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1584  | --syscon | --sysco | --sysc | --sys | --sy)
1585    ac_prev=sysconfdir ;;
1586  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1587  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1588    sysconfdir=$ac_optarg ;;
1589
1590  -target | --target | --targe | --targ | --tar | --ta | --t)
1591    ac_prev=target_alias ;;
1592  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1593    target_alias=$ac_optarg ;;
1594
1595  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1596    verbose=yes ;;
1597
1598  -version | --version | --versio | --versi | --vers | -V)
1599    ac_init_version=: ;;
1600
1601  -with-* | --with-*)
1602    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1603    # Reject names that are not valid shell variable names.
1604    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1605      as_fn_error $? "invalid package name: $ac_useropt"
1606    ac_useropt_orig=$ac_useropt
1607    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1608    case $ac_user_opts in
1609      *"
1610"with_$ac_useropt"
1611"*) ;;
1612      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1613	 ac_unrecognized_sep=', ';;
1614    esac
1615    eval with_$ac_useropt=\$ac_optarg ;;
1616
1617  -without-* | --without-*)
1618    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1619    # Reject names that are not valid shell variable names.
1620    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1621      as_fn_error $? "invalid package name: $ac_useropt"
1622    ac_useropt_orig=$ac_useropt
1623    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1624    case $ac_user_opts in
1625      *"
1626"with_$ac_useropt"
1627"*) ;;
1628      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1629	 ac_unrecognized_sep=', ';;
1630    esac
1631    eval with_$ac_useropt=no ;;
1632
1633  --x)
1634    # Obsolete; use --with-x.
1635    with_x=yes ;;
1636
1637  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1638  | --x-incl | --x-inc | --x-in | --x-i)
1639    ac_prev=x_includes ;;
1640  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1641  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1642    x_includes=$ac_optarg ;;
1643
1644  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1645  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1646    ac_prev=x_libraries ;;
1647  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1648  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1649    x_libraries=$ac_optarg ;;
1650
1651  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1652Try \`$0 --help' for more information"
1653    ;;
1654
1655  *=*)
1656    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1657    # Reject names that are not valid shell variable names.
1658    case $ac_envvar in #(
1659      '' | [0-9]* | *[!_$as_cr_alnum]* )
1660      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1661    esac
1662    eval $ac_envvar=\$ac_optarg
1663    export $ac_envvar ;;
1664
1665  *)
1666    # FIXME: should be removed in autoconf 3.0.
1667    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1668    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1669      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1670    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1671    ;;
1672
1673  esac
1674done
1675
1676if test -n "$ac_prev"; then
1677  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1678  as_fn_error $? "missing argument to $ac_option"
1679fi
1680
1681if test -n "$ac_unrecognized_opts"; then
1682  case $enable_option_checking in
1683    no) ;;
1684    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1685    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1686  esac
1687fi
1688
1689# Check all directory arguments for consistency.
1690for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1691		datadir sysconfdir sharedstatedir localstatedir includedir \
1692		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1693		libdir localedir mandir
1694do
1695  eval ac_val=\$$ac_var
1696  # Remove trailing slashes.
1697  case $ac_val in
1698    */ )
1699      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1700      eval $ac_var=\$ac_val;;
1701  esac
1702  # Be sure to have absolute directory names.
1703  case $ac_val in
1704    [\\/$]* | ?:[\\/]* )  continue;;
1705    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1706  esac
1707  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1708done
1709
1710# There might be people who depend on the old broken behavior: `$host'
1711# used to hold the argument of --host etc.
1712# FIXME: To remove some day.
1713build=$build_alias
1714host=$host_alias
1715target=$target_alias
1716
1717# FIXME: To remove some day.
1718if test "x$host_alias" != x; then
1719  if test "x$build_alias" = x; then
1720    cross_compiling=maybe
1721  elif test "x$build_alias" != "x$host_alias"; then
1722    cross_compiling=yes
1723  fi
1724fi
1725
1726ac_tool_prefix=
1727test -n "$host_alias" && ac_tool_prefix=$host_alias-
1728
1729test "$silent" = yes && exec 6>/dev/null
1730
1731
1732ac_pwd=`pwd` && test -n "$ac_pwd" &&
1733ac_ls_di=`ls -di .` &&
1734ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1735  as_fn_error $? "working directory cannot be determined"
1736test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1737  as_fn_error $? "pwd does not report name of working directory"
1738
1739
1740# Find the source files, if location was not specified.
1741if test -z "$srcdir"; then
1742  ac_srcdir_defaulted=yes
1743  # Try the directory containing this script, then the parent directory.
1744  ac_confdir=`$as_dirname -- "$as_myself" ||
1745$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1746	 X"$as_myself" : 'X\(//\)[^/]' \| \
1747	 X"$as_myself" : 'X\(//\)$' \| \
1748	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1749$as_echo X"$as_myself" |
1750    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1751	    s//\1/
1752	    q
1753	  }
1754	  /^X\(\/\/\)[^/].*/{
1755	    s//\1/
1756	    q
1757	  }
1758	  /^X\(\/\/\)$/{
1759	    s//\1/
1760	    q
1761	  }
1762	  /^X\(\/\).*/{
1763	    s//\1/
1764	    q
1765	  }
1766	  s/.*/./; q'`
1767  srcdir=$ac_confdir
1768  if test ! -r "$srcdir/$ac_unique_file"; then
1769    srcdir=..
1770  fi
1771else
1772  ac_srcdir_defaulted=no
1773fi
1774if test ! -r "$srcdir/$ac_unique_file"; then
1775  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1776  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1777fi
1778ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1779ac_abs_confdir=`(
1780	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1781	pwd)`
1782# When building in place, set srcdir=.
1783if test "$ac_abs_confdir" = "$ac_pwd"; then
1784  srcdir=.
1785fi
1786# Remove unnecessary trailing slashes from srcdir.
1787# Double slashes in file names in object file debugging info
1788# mess up M-x gdb in Emacs.
1789case $srcdir in
1790*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1791esac
1792for ac_var in $ac_precious_vars; do
1793  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1794  eval ac_env_${ac_var}_value=\$${ac_var}
1795  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1796  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1797done
1798
1799#
1800# Report the --help message.
1801#
1802if test "$ac_init_help" = "long"; then
1803  # Omit some internal or obsolete options to make the list less imposing.
1804  # This message is too long to be a string in the A/UX 3.1 sh.
1805  cat <<_ACEOF
1806\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1807
1808Usage: $0 [OPTION]... [VAR=VALUE]...
1809
1810To assign environment variables (e.g., CC, CFLAGS...), specify them as
1811VAR=VALUE.  See below for descriptions of some of the useful variables.
1812
1813Defaults for the options are specified in brackets.
1814
1815Configuration:
1816  -h, --help              display this help and exit
1817      --help=short        display options specific to this package
1818      --help=recursive    display the short help of all the included packages
1819  -V, --version           display version information and exit
1820  -q, --quiet, --silent   do not print \`checking ...' messages
1821      --cache-file=FILE   cache test results in FILE [disabled]
1822  -C, --config-cache      alias for \`--cache-file=config.cache'
1823  -n, --no-create         do not create output files
1824      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1825
1826Installation directories:
1827  --prefix=PREFIX         install architecture-independent files in PREFIX
1828                          [$ac_default_prefix]
1829  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1830                          [PREFIX]
1831
1832By default, \`make install' will install all the files in
1833\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1834an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1835for instance \`--prefix=\$HOME'.
1836
1837For better control, use the options below.
1838
1839Fine tuning of the installation directories:
1840  --bindir=DIR            user executables [EPREFIX/bin]
1841  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1842  --libexecdir=DIR        program executables [EPREFIX/libexec]
1843  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1844  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1845  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1846  --libdir=DIR            object code libraries [EPREFIX/lib]
1847  --includedir=DIR        C header files [PREFIX/include]
1848  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1849  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1850  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1851  --infodir=DIR           info documentation [DATAROOTDIR/info]
1852  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1853  --mandir=DIR            man documentation [DATAROOTDIR/man]
1854  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1855  --htmldir=DIR           html documentation [DOCDIR]
1856  --dvidir=DIR            dvi documentation [DOCDIR]
1857  --pdfdir=DIR            pdf documentation [DOCDIR]
1858  --psdir=DIR             ps documentation [DOCDIR]
1859_ACEOF
1860
1861  cat <<\_ACEOF
1862
1863X features:
1864  --x-includes=DIR    X include files are in DIR
1865  --x-libraries=DIR   X library files are in DIR
1866
1867System types:
1868  --build=BUILD     configure for building on BUILD [guessed]
1869  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1870  --target=TARGET   configure for building compilers for TARGET [HOST]
1871_ACEOF
1872fi
1873
1874if test -n "$ac_init_help"; then
1875  case $ac_init_help in
1876     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1877   esac
1878  cat <<\_ACEOF
1879
1880Optional Features:
1881  --disable-option-checking  ignore unrecognized --enable/--with options
1882  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1883  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1884  --enable-openjdk-only   suppress building custom source even if present
1885                          [disabled]
1886  --enable-debug          set the debug level to fastdebug (shorthand for
1887                          --with-debug-level=fastdebug) [disabled]
1888  --disable-headful       disable building headful support (graphical UI
1889                          support) [enabled]
1890  --enable-unlimited-crypto
1891                          Enable unlimited crypto policy [disabled]
1892  --enable-hotspot-test-in-build
1893                          run the Queens test after Hotspot build [disabled]
1894  --enable-static-build   enable static library build [disabled]
1895  --disable-warnings-as-errors
1896                          do not consider native warnings to be an error
1897                          [enabled]
1898  --enable-debug-symbols  Deprecated. Option is kept for backwards
1899                          compatibility and is ignored
1900  --enable-zip-debug-info Deprecated. Option is kept for backwards
1901                          compatibility and is ignored
1902  --enable-native-coverage
1903                          enable native compilation with code coverage
1904                          data[disabled]
1905  --disable-freetype-bundling
1906                          disable bundling of the freetype library with the
1907                          build result [enabled on Windows or when using
1908                          --with-freetype, disabled otherwise]
1909  --enable-sjavac         use sjavac to do fast incremental compiles
1910                          [disabled]
1911  --disable-javac-server  disable javac server [enabled]
1912  --enable-icecc          enable distribted compilation of native code using
1913                          icecc/icecream [disabled]
1914  --disable-precompiled-headers
1915                          disable using precompiled headers when compiling C++
1916                          [enabled]
1917  --enable-ccache         enable using ccache to speed up recompilations
1918                          [disabled]
1919
1920Optional Packages:
1921  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1922  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1923  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1924                          support it), e.g. --with-target-bits=32 [guessed]
1925  --with-custom-make-dir  Deprecated. Option is kept for backwards
1926                          compatibility and is ignored
1927  --with-jdk-variant      JDK variant to build (normal) [normal]
1928  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1929  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1930                          client, minimal1, zero, zeroshark, core) [server]
1931  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1932                          optimized (HotSpot build only)) [release]
1933  --with-devkit           use this devkit for compilers, tools and resources
1934  --with-sys-root         alias for --with-sysroot for backwards compatability
1935  --with-sysroot          use this directory as sysroot
1936  --with-tools-dir        alias for --with-toolchain-path for backwards
1937                          compatibility
1938  --with-toolchain-path   prepend these directories when searching for
1939                          toolchain binaries (compilers etc)
1940  --with-extra-path       prepend these directories to the default path
1941  --with-sdk-name         use the platform SDK of the given name. [macosx]
1942  --with-conf-name        use this as the name of the configuration [generated
1943                          from important configuration options]
1944  --with-output-sync      set make output sync type if supported by make.
1945                          [recurse]
1946  --with-default-make-target
1947                          set the default make target [exploded-image]
1948  --with-cacerts-file     specify alternative cacerts file
1949  --with-copyright-year   Set copyright year value for build [current year]
1950  --with-milestone        Deprecated. Option is kept for backwards
1951                          compatibility and is ignored
1952  --with-update-version   Deprecated. Option is kept for backwards
1953                          compatibility and is ignored
1954  --with-user-release-suffix
1955                          Deprecated. Option is kept for backwards
1956                          compatibility and is ignored
1957  --with-build-number     Deprecated. Option is kept for backwards
1958                          compatibility and is ignored
1959  --with-version-string   Set version string [calculated]
1960  --with-version-pre      Set the base part of the version 'PRE' field
1961                          (pre-release identifier) ['internal']
1962  --with-version-opt      Set version 'OPT' field (build metadata)
1963                          [<timestamp>.<user>.<dirname>]
1964  --with-version-build    Set version 'BUILD' field (build number) [not
1965                          specified]
1966  --with-version-major    Set version 'MAJOR' field (first number) [current
1967                          source value]
1968  --with-version-minor    Set version 'MINOR' field (second number) [current
1969                          source value]
1970  --with-version-security Set version 'SECURITY' field (third number) [current
1971                          source value]
1972  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1973                          specified]
1974  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1975  --with-add-source-root  Deprecated. Option is kept for backwards
1976                          compatibility and is ignored
1977  --with-override-source-root
1978                          Deprecated. Option is kept for backwards
1979                          compatibility and is ignored
1980  --with-adds-and-overrides
1981                          Deprecated. Option is kept for backwards
1982                          compatibility and is ignored
1983  --with-override-langtools
1984                          Deprecated. Option is kept for backwards
1985                          compatibility and is ignored
1986  --with-override-corba   Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --with-override-jaxp    Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --with-override-jaxws   Deprecated. Option is kept for backwards
1991                          compatibility and is ignored
1992  --with-override-hotspot Deprecated. Option is kept for backwards
1993                          compatibility and is ignored
1994  --with-override-nashorn Deprecated. Option is kept for backwards
1995                          compatibility and is ignored
1996  --with-override-jdk     Deprecated. Option is kept for backwards
1997                          compatibility and is ignored
1998  --with-import-hotspot   import hotspot binaries from this jdk image or
1999                          hotspot build dist dir instead of building from
2000                          source
2001  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2002                          to show possible values [platform dependent]
2003  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2004  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2005  --with-extra-ldflags    extra flags to be used when linking jdk
2006  --with-toolchain-version
2007                          the version of the toolchain to look for, use
2008                          '--help' to show possible values [platform
2009                          dependent]
2010  --with-build-devkit     Devkit to use for the build platform toolchain
2011  --with-jtreg            Regression Test Harness [probed]
2012  --with-native-debug-symbols
2013                          set the native debug symbol configuration (none,
2014                          internal, external, zipped) [zipped]
2015  --with-stdc++lib=<static>,<dynamic>,<default>
2016                          force linking of the C++ runtime on Linux to either
2017                          static or dynamic, default is static with dynamic as
2018                          fallback
2019  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2020                          (Windows only) [probed]
2021  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2022                          (Windows only) [probed]
2023  --with-x                use the X Window System
2024  --with-cups             specify prefix directory for the cups package
2025                          (expecting the headers under PATH/include)
2026  --with-cups-include     specify directory for the cups include files
2027  --with-freetype         specify prefix directory for the freetype package
2028                          (expecting the libraries under PATH/lib and the
2029                          headers under PATH/include)
2030  --with-freetype-include specify directory for the freetype include files
2031  --with-freetype-lib     specify directory for the freetype library
2032  --with-freetype-src     specify directory with freetype sources to
2033                          automatically build the library (experimental,
2034                          Windows-only)
2035  --with-alsa             specify prefix directory for the alsa package
2036                          (expecting the libraries under PATH/lib and the
2037                          headers under PATH/include)
2038  --with-alsa-include     specify directory for the alsa include files
2039  --with-alsa-lib         specify directory for the alsa library
2040  --with-libffi           specify prefix directory for the libffi package
2041                          (expecting the libraries under PATH/lib and the
2042                          headers under PATH/include)
2043  --with-libffi-include   specify directory for the libffi include files
2044  --with-libffi-lib       specify directory for the libffi library
2045  --with-libjpeg          use libjpeg from build system or OpenJDK source
2046                          (system, bundled) [bundled]
2047  --with-giflib           use giflib from build system or OpenJDK source
2048                          (system, bundled) [bundled]
2049  --with-libpng           use libpng from build system or OpenJDK source
2050                          (system, bundled) [bundled]
2051  --with-zlib             use zlib from build system or OpenJDK source
2052                          (system, bundled) [bundled]
2053  --with-lcms             use lcms2 from build system or OpenJDK source
2054                          (system, bundled) [bundled]
2055  --with-dxsdk            Deprecated. Option is kept for backwards
2056                          compatibility and is ignored
2057  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2058                          compatibility and is ignored
2059  --with-dxsdk-include    Deprecated. Option is kept for backwards
2060                          compatibility and is ignored
2061  --with-num-cores        number of cores in the build system, e.g.
2062                          --with-num-cores=8 [probed]
2063  --with-memory-size      memory (in MB) available in the build system, e.g.
2064                          --with-memory-size=1024 [probed]
2065  --with-jobs             number of parallel jobs to let make run [calculated
2066                          based on cores and memory]
2067  --with-test-jobs        number of parallel tests jobs to run [based on build
2068                          jobs]
2069  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2070                          invocations of boot JDK, overriding the default
2071                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2072                          -enableassertions"
2073  --with-sjavac-server-java
2074                          use this java binary for running the sjavac
2075                          background server [Boot JDK java]
2076  --with-ccache-dir       where to store ccache files [~/.ccache]
2077
2078Some influential environment variables:
2079  BASENAME    Override default value for BASENAME
2080  BASH        Override default value for BASH
2081  CAT         Override default value for CAT
2082  CHMOD       Override default value for CHMOD
2083  CMP         Override default value for CMP
2084  COMM        Override default value for COMM
2085  CP          Override default value for CP
2086  CUT         Override default value for CUT
2087  DATE        Override default value for DATE
2088  DIFF        Override default value for DIFF
2089  DIRNAME     Override default value for DIRNAME
2090  ECHO        Override default value for ECHO
2091  EXPR        Override default value for EXPR
2092  FILE        Override default value for FILE
2093  FIND        Override default value for FIND
2094  HEAD        Override default value for HEAD
2095  LN          Override default value for LN
2096  LS          Override default value for LS
2097  MKDIR       Override default value for MKDIR
2098  MKTEMP      Override default value for MKTEMP
2099  MV          Override default value for MV
2100  NAWK        Override default value for NAWK
2101  PRINTF      Override default value for PRINTF
2102  RM          Override default value for RM
2103  RMDIR       Override default value for RMDIR
2104  SH          Override default value for SH
2105  SORT        Override default value for SORT
2106  TAIL        Override default value for TAIL
2107  TAR         Override default value for TAR
2108  TEE         Override default value for TEE
2109  TOUCH       Override default value for TOUCH
2110  TR          Override default value for TR
2111  UNAME       Override default value for UNAME
2112  UNIQ        Override default value for UNIQ
2113  WC          Override default value for WC
2114  WHICH       Override default value for WHICH
2115  XARGS       Override default value for XARGS
2116  AWK         Override default value for AWK
2117  GREP        Override default value for GREP
2118  EGREP       Override default value for EGREP
2119  FGREP       Override default value for FGREP
2120  SED         Override default value for SED
2121  CYGPATH     Override default value for CYGPATH
2122  READLINK    Override default value for READLINK
2123  DF          Override default value for DF
2124  CPIO        Override default value for CPIO
2125  NICE        Override default value for NICE
2126  MAKE        Override default value for MAKE
2127  UNZIP       Override default value for UNZIP
2128  ZIP         Override default value for ZIP
2129  LDD         Override default value for LDD
2130  OTOOL       Override default value for OTOOL
2131  READELF     Override default value for READELF
2132  HG          Override default value for HG
2133  STAT        Override default value for STAT
2134  TIME        Override default value for TIME
2135  PATCH       Override default value for PATCH
2136  DSYMUTIL    Override default value for DSYMUTIL
2137  XATTR       Override default value for XATTR
2138  CODESIGN    Override default value for CODESIGN
2139  SETFILE     Override default value for SETFILE
2140  PKG_CONFIG  path to pkg-config utility
2141  JAVA        Override default value for JAVA
2142  JAVAC       Override default value for JAVAC
2143  JAVAH       Override default value for JAVAH
2144  JAR         Override default value for JAR
2145  JARSIGNER   Override default value for JARSIGNER
2146  CC          C compiler command
2147  CFLAGS      C compiler flags
2148  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2149              nonstandard directory <lib dir>
2150  LIBS        libraries to pass to the linker, e.g. -l<library>
2151  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2152              you have headers in a nonstandard directory <include dir>
2153  CXX         C++ compiler command
2154  CXXFLAGS    C++ compiler flags
2155  CPP         C preprocessor
2156  CXXCPP      C++ preprocessor
2157  AS          Override default value for AS
2158  AR          Override default value for AR
2159  LIPO        Override default value for LIPO
2160  STRIP       Override default value for STRIP
2161  NM          Override default value for NM
2162  GNM         Override default value for GNM
2163  OBJCOPY     Override default value for OBJCOPY
2164  OBJDUMP     Override default value for OBJDUMP
2165  BUILD_CC    Override default value for BUILD_CC
2166  BUILD_CXX   Override default value for BUILD_CXX
2167  BUILD_NM    Override default value for BUILD_NM
2168  BUILD_AR    Override default value for BUILD_AR
2169  JTREGEXE    Override default value for JTREGEXE
2170  XMKMF       Path to xmkmf, Makefile generator for X Window System
2171  FREETYPE_CFLAGS
2172              C compiler flags for FREETYPE, overriding pkg-config
2173  FREETYPE_LIBS
2174              linker flags for FREETYPE, overriding pkg-config
2175  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2176  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2177  LIBFFI_CFLAGS
2178              C compiler flags for LIBFFI, overriding pkg-config
2179  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2180  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2181  PNG_LIBS    linker flags for PNG, overriding pkg-config
2182  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2183  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2184  ICECC_CMD   Override default value for ICECC_CMD
2185  ICECC_CREATE_ENV
2186              Override default value for ICECC_CREATE_ENV
2187  ICECC_WRAPPER
2188              Override default value for ICECC_WRAPPER
2189  CCACHE      Override default value for CCACHE
2190
2191Use these variables to override the choices made by `configure' or to help
2192it to find libraries and programs with nonstandard names/locations.
2193
2194Report bugs to <build-dev@openjdk.java.net>.
2195OpenJDK home page: <http://openjdk.java.net>.
2196_ACEOF
2197ac_status=$?
2198fi
2199
2200if test "$ac_init_help" = "recursive"; then
2201  # If there are subdirs, report their specific --help.
2202  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2203    test -d "$ac_dir" ||
2204      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2205      continue
2206    ac_builddir=.
2207
2208case "$ac_dir" in
2209.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2210*)
2211  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2212  # A ".." for each directory in $ac_dir_suffix.
2213  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2214  case $ac_top_builddir_sub in
2215  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2216  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2217  esac ;;
2218esac
2219ac_abs_top_builddir=$ac_pwd
2220ac_abs_builddir=$ac_pwd$ac_dir_suffix
2221# for backward compatibility:
2222ac_top_builddir=$ac_top_build_prefix
2223
2224case $srcdir in
2225  .)  # We are building in place.
2226    ac_srcdir=.
2227    ac_top_srcdir=$ac_top_builddir_sub
2228    ac_abs_top_srcdir=$ac_pwd ;;
2229  [\\/]* | ?:[\\/]* )  # Absolute name.
2230    ac_srcdir=$srcdir$ac_dir_suffix;
2231    ac_top_srcdir=$srcdir
2232    ac_abs_top_srcdir=$srcdir ;;
2233  *) # Relative name.
2234    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2235    ac_top_srcdir=$ac_top_build_prefix$srcdir
2236    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2237esac
2238ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2239
2240    cd "$ac_dir" || { ac_status=$?; continue; }
2241    # Check for guested configure.
2242    if test -f "$ac_srcdir/configure.gnu"; then
2243      echo &&
2244      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2245    elif test -f "$ac_srcdir/configure"; then
2246      echo &&
2247      $SHELL "$ac_srcdir/configure" --help=recursive
2248    else
2249      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2250    fi || ac_status=$?
2251    cd "$ac_pwd" || { ac_status=$?; break; }
2252  done
2253fi
2254
2255test -n "$ac_init_help" && exit $ac_status
2256if $ac_init_version; then
2257  cat <<\_ACEOF
2258OpenJDK configure jdk9
2259generated by GNU Autoconf 2.69
2260
2261Copyright (C) 2012 Free Software Foundation, Inc.
2262This configure script is free software; the Free Software Foundation
2263gives unlimited permission to copy, distribute and modify it.
2264_ACEOF
2265  exit
2266fi
2267
2268## ------------------------ ##
2269## Autoconf initialization. ##
2270## ------------------------ ##
2271
2272# ac_fn_c_try_compile LINENO
2273# --------------------------
2274# Try to compile conftest.$ac_ext, and return whether this succeeded.
2275ac_fn_c_try_compile ()
2276{
2277  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2278  rm -f conftest.$ac_objext
2279  if { { ac_try="$ac_compile"
2280case "(($ac_try" in
2281  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2282  *) ac_try_echo=$ac_try;;
2283esac
2284eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2285$as_echo "$ac_try_echo"; } >&5
2286  (eval "$ac_compile") 2>conftest.err
2287  ac_status=$?
2288  if test -s conftest.err; then
2289    grep -v '^ *+' conftest.err >conftest.er1
2290    cat conftest.er1 >&5
2291    mv -f conftest.er1 conftest.err
2292  fi
2293  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2294  test $ac_status = 0; } && {
2295	 test -z "$ac_c_werror_flag" ||
2296	 test ! -s conftest.err
2297       } && test -s conftest.$ac_objext; then :
2298  ac_retval=0
2299else
2300  $as_echo "$as_me: failed program was:" >&5
2301sed 's/^/| /' conftest.$ac_ext >&5
2302
2303	ac_retval=1
2304fi
2305  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2306  as_fn_set_status $ac_retval
2307
2308} # ac_fn_c_try_compile
2309
2310# ac_fn_cxx_try_compile LINENO
2311# ----------------------------
2312# Try to compile conftest.$ac_ext, and return whether this succeeded.
2313ac_fn_cxx_try_compile ()
2314{
2315  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2316  rm -f conftest.$ac_objext
2317  if { { ac_try="$ac_compile"
2318case "(($ac_try" in
2319  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2320  *) ac_try_echo=$ac_try;;
2321esac
2322eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2323$as_echo "$ac_try_echo"; } >&5
2324  (eval "$ac_compile") 2>conftest.err
2325  ac_status=$?
2326  if test -s conftest.err; then
2327    grep -v '^ *+' conftest.err >conftest.er1
2328    cat conftest.er1 >&5
2329    mv -f conftest.er1 conftest.err
2330  fi
2331  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2332  test $ac_status = 0; } && {
2333	 test -z "$ac_cxx_werror_flag" ||
2334	 test ! -s conftest.err
2335       } && test -s conftest.$ac_objext; then :
2336  ac_retval=0
2337else
2338  $as_echo "$as_me: failed program was:" >&5
2339sed 's/^/| /' conftest.$ac_ext >&5
2340
2341	ac_retval=1
2342fi
2343  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2344  as_fn_set_status $ac_retval
2345
2346} # ac_fn_cxx_try_compile
2347
2348# ac_fn_c_try_cpp LINENO
2349# ----------------------
2350# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2351ac_fn_c_try_cpp ()
2352{
2353  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2354  if { { ac_try="$ac_cpp conftest.$ac_ext"
2355case "(($ac_try" in
2356  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2357  *) ac_try_echo=$ac_try;;
2358esac
2359eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2360$as_echo "$ac_try_echo"; } >&5
2361  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2362  ac_status=$?
2363  if test -s conftest.err; then
2364    grep -v '^ *+' conftest.err >conftest.er1
2365    cat conftest.er1 >&5
2366    mv -f conftest.er1 conftest.err
2367  fi
2368  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2369  test $ac_status = 0; } > conftest.i && {
2370	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2371	 test ! -s conftest.err
2372       }; then :
2373  ac_retval=0
2374else
2375  $as_echo "$as_me: failed program was:" >&5
2376sed 's/^/| /' conftest.$ac_ext >&5
2377
2378    ac_retval=1
2379fi
2380  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2381  as_fn_set_status $ac_retval
2382
2383} # ac_fn_c_try_cpp
2384
2385# ac_fn_cxx_try_cpp LINENO
2386# ------------------------
2387# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2388ac_fn_cxx_try_cpp ()
2389{
2390  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2391  if { { ac_try="$ac_cpp conftest.$ac_ext"
2392case "(($ac_try" in
2393  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2394  *) ac_try_echo=$ac_try;;
2395esac
2396eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2397$as_echo "$ac_try_echo"; } >&5
2398  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2399  ac_status=$?
2400  if test -s conftest.err; then
2401    grep -v '^ *+' conftest.err >conftest.er1
2402    cat conftest.er1 >&5
2403    mv -f conftest.er1 conftest.err
2404  fi
2405  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2406  test $ac_status = 0; } > conftest.i && {
2407	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2408	 test ! -s conftest.err
2409       }; then :
2410  ac_retval=0
2411else
2412  $as_echo "$as_me: failed program was:" >&5
2413sed 's/^/| /' conftest.$ac_ext >&5
2414
2415    ac_retval=1
2416fi
2417  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2418  as_fn_set_status $ac_retval
2419
2420} # ac_fn_cxx_try_cpp
2421
2422# ac_fn_c_try_link LINENO
2423# -----------------------
2424# Try to link conftest.$ac_ext, and return whether this succeeded.
2425ac_fn_c_try_link ()
2426{
2427  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2428  rm -f conftest.$ac_objext conftest$ac_exeext
2429  if { { ac_try="$ac_link"
2430case "(($ac_try" in
2431  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2432  *) ac_try_echo=$ac_try;;
2433esac
2434eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2435$as_echo "$ac_try_echo"; } >&5
2436  (eval "$ac_link") 2>conftest.err
2437  ac_status=$?
2438  if test -s conftest.err; then
2439    grep -v '^ *+' conftest.err >conftest.er1
2440    cat conftest.er1 >&5
2441    mv -f conftest.er1 conftest.err
2442  fi
2443  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2444  test $ac_status = 0; } && {
2445	 test -z "$ac_c_werror_flag" ||
2446	 test ! -s conftest.err
2447       } && test -s conftest$ac_exeext && {
2448	 test "$cross_compiling" = yes ||
2449	 test -x conftest$ac_exeext
2450       }; then :
2451  ac_retval=0
2452else
2453  $as_echo "$as_me: failed program was:" >&5
2454sed 's/^/| /' conftest.$ac_ext >&5
2455
2456	ac_retval=1
2457fi
2458  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2459  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2460  # interfere with the next link command; also delete a directory that is
2461  # left behind by Apple's compiler.  We do this before executing the actions.
2462  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2463  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2464  as_fn_set_status $ac_retval
2465
2466} # ac_fn_c_try_link
2467
2468# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2469# ---------------------------------------------------------
2470# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2471# the include files in INCLUDES and setting the cache variable VAR
2472# accordingly.
2473ac_fn_cxx_check_header_mongrel ()
2474{
2475  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2476  if eval \${$3+:} false; then :
2477  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2478$as_echo_n "checking for $2... " >&6; }
2479if eval \${$3+:} false; then :
2480  $as_echo_n "(cached) " >&6
2481fi
2482eval ac_res=\$$3
2483	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2484$as_echo "$ac_res" >&6; }
2485else
2486  # Is the header compilable?
2487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2488$as_echo_n "checking $2 usability... " >&6; }
2489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2490/* end confdefs.h.  */
2491$4
2492#include <$2>
2493_ACEOF
2494if ac_fn_cxx_try_compile "$LINENO"; then :
2495  ac_header_compiler=yes
2496else
2497  ac_header_compiler=no
2498fi
2499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2501$as_echo "$ac_header_compiler" >&6; }
2502
2503# Is the header present?
2504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2505$as_echo_n "checking $2 presence... " >&6; }
2506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2507/* end confdefs.h.  */
2508#include <$2>
2509_ACEOF
2510if ac_fn_cxx_try_cpp "$LINENO"; then :
2511  ac_header_preproc=yes
2512else
2513  ac_header_preproc=no
2514fi
2515rm -f conftest.err conftest.i conftest.$ac_ext
2516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2517$as_echo "$ac_header_preproc" >&6; }
2518
2519# So?  What about this header?
2520case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2521  yes:no: )
2522    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2523$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2524    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2525$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2526    ;;
2527  no:yes:* )
2528    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2529$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2530    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2531$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2532    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2533$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2534    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2535$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2536    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2537$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2538( $as_echo "## ----------------------------------------- ##
2539## Report this to build-dev@openjdk.java.net ##
2540## ----------------------------------------- ##"
2541     ) | sed "s/^/$as_me: WARNING:     /" >&2
2542    ;;
2543esac
2544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2545$as_echo_n "checking for $2... " >&6; }
2546if eval \${$3+:} false; then :
2547  $as_echo_n "(cached) " >&6
2548else
2549  eval "$3=\$ac_header_compiler"
2550fi
2551eval ac_res=\$$3
2552	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2553$as_echo "$ac_res" >&6; }
2554fi
2555  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2556
2557} # ac_fn_cxx_check_header_mongrel
2558
2559# ac_fn_cxx_try_run LINENO
2560# ------------------------
2561# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2562# that executables *can* be run.
2563ac_fn_cxx_try_run ()
2564{
2565  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2566  if { { ac_try="$ac_link"
2567case "(($ac_try" in
2568  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2569  *) ac_try_echo=$ac_try;;
2570esac
2571eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2572$as_echo "$ac_try_echo"; } >&5
2573  (eval "$ac_link") 2>&5
2574  ac_status=$?
2575  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2576  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2577  { { case "(($ac_try" in
2578  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2579  *) ac_try_echo=$ac_try;;
2580esac
2581eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2582$as_echo "$ac_try_echo"; } >&5
2583  (eval "$ac_try") 2>&5
2584  ac_status=$?
2585  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2586  test $ac_status = 0; }; }; then :
2587  ac_retval=0
2588else
2589  $as_echo "$as_me: program exited with status $ac_status" >&5
2590       $as_echo "$as_me: failed program was:" >&5
2591sed 's/^/| /' conftest.$ac_ext >&5
2592
2593       ac_retval=$ac_status
2594fi
2595  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2596  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2597  as_fn_set_status $ac_retval
2598
2599} # ac_fn_cxx_try_run
2600
2601# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2602# ---------------------------------------------------------
2603# Tests whether HEADER exists and can be compiled using the include files in
2604# INCLUDES, setting the cache variable VAR accordingly.
2605ac_fn_cxx_check_header_compile ()
2606{
2607  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2609$as_echo_n "checking for $2... " >&6; }
2610if eval \${$3+:} false; then :
2611  $as_echo_n "(cached) " >&6
2612else
2613  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2614/* end confdefs.h.  */
2615$4
2616#include <$2>
2617_ACEOF
2618if ac_fn_cxx_try_compile "$LINENO"; then :
2619  eval "$3=yes"
2620else
2621  eval "$3=no"
2622fi
2623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2624fi
2625eval ac_res=\$$3
2626	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2627$as_echo "$ac_res" >&6; }
2628  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2629
2630} # ac_fn_cxx_check_header_compile
2631
2632# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2633# ----------------------------------------------
2634# Tries to find the compile-time value of EXPR in a program that includes
2635# INCLUDES, setting VAR accordingly. Returns whether the value could be
2636# computed
2637ac_fn_cxx_compute_int ()
2638{
2639  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2640  if test "$cross_compiling" = yes; then
2641    # Depending upon the size, compute the lo and hi bounds.
2642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2643/* end confdefs.h.  */
2644$4
2645int
2646main ()
2647{
2648static int test_array [1 - 2 * !(($2) >= 0)];
2649test_array [0] = 0;
2650return test_array [0];
2651
2652  ;
2653  return 0;
2654}
2655_ACEOF
2656if ac_fn_cxx_try_compile "$LINENO"; then :
2657  ac_lo=0 ac_mid=0
2658  while :; do
2659    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2660/* end confdefs.h.  */
2661$4
2662int
2663main ()
2664{
2665static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2666test_array [0] = 0;
2667return test_array [0];
2668
2669  ;
2670  return 0;
2671}
2672_ACEOF
2673if ac_fn_cxx_try_compile "$LINENO"; then :
2674  ac_hi=$ac_mid; break
2675else
2676  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2677			if test $ac_lo -le $ac_mid; then
2678			  ac_lo= ac_hi=
2679			  break
2680			fi
2681			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2682fi
2683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2684  done
2685else
2686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2687/* end confdefs.h.  */
2688$4
2689int
2690main ()
2691{
2692static int test_array [1 - 2 * !(($2) < 0)];
2693test_array [0] = 0;
2694return test_array [0];
2695
2696  ;
2697  return 0;
2698}
2699_ACEOF
2700if ac_fn_cxx_try_compile "$LINENO"; then :
2701  ac_hi=-1 ac_mid=-1
2702  while :; do
2703    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2704/* end confdefs.h.  */
2705$4
2706int
2707main ()
2708{
2709static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2710test_array [0] = 0;
2711return test_array [0];
2712
2713  ;
2714  return 0;
2715}
2716_ACEOF
2717if ac_fn_cxx_try_compile "$LINENO"; then :
2718  ac_lo=$ac_mid; break
2719else
2720  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2721			if test $ac_mid -le $ac_hi; then
2722			  ac_lo= ac_hi=
2723			  break
2724			fi
2725			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2726fi
2727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2728  done
2729else
2730  ac_lo= ac_hi=
2731fi
2732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2733fi
2734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2735# Binary search between lo and hi bounds.
2736while test "x$ac_lo" != "x$ac_hi"; do
2737  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2738  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2739/* end confdefs.h.  */
2740$4
2741int
2742main ()
2743{
2744static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2745test_array [0] = 0;
2746return test_array [0];
2747
2748  ;
2749  return 0;
2750}
2751_ACEOF
2752if ac_fn_cxx_try_compile "$LINENO"; then :
2753  ac_hi=$ac_mid
2754else
2755  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2756fi
2757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2758done
2759case $ac_lo in #((
2760?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2761'') ac_retval=1 ;;
2762esac
2763  else
2764    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2765/* end confdefs.h.  */
2766$4
2767static long int longval () { return $2; }
2768static unsigned long int ulongval () { return $2; }
2769#include <stdio.h>
2770#include <stdlib.h>
2771int
2772main ()
2773{
2774
2775  FILE *f = fopen ("conftest.val", "w");
2776  if (! f)
2777    return 1;
2778  if (($2) < 0)
2779    {
2780      long int i = longval ();
2781      if (i != ($2))
2782	return 1;
2783      fprintf (f, "%ld", i);
2784    }
2785  else
2786    {
2787      unsigned long int i = ulongval ();
2788      if (i != ($2))
2789	return 1;
2790      fprintf (f, "%lu", i);
2791    }
2792  /* Do not output a trailing newline, as this causes \r\n confusion
2793     on some platforms.  */
2794  return ferror (f) || fclose (f) != 0;
2795
2796  ;
2797  return 0;
2798}
2799_ACEOF
2800if ac_fn_cxx_try_run "$LINENO"; then :
2801  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2802else
2803  ac_retval=1
2804fi
2805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2806  conftest.$ac_objext conftest.beam conftest.$ac_ext
2807rm -f conftest.val
2808
2809  fi
2810  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2811  as_fn_set_status $ac_retval
2812
2813} # ac_fn_cxx_compute_int
2814
2815# ac_fn_cxx_try_link LINENO
2816# -------------------------
2817# Try to link conftest.$ac_ext, and return whether this succeeded.
2818ac_fn_cxx_try_link ()
2819{
2820  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2821  rm -f conftest.$ac_objext conftest$ac_exeext
2822  if { { ac_try="$ac_link"
2823case "(($ac_try" in
2824  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2825  *) ac_try_echo=$ac_try;;
2826esac
2827eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2828$as_echo "$ac_try_echo"; } >&5
2829  (eval "$ac_link") 2>conftest.err
2830  ac_status=$?
2831  if test -s conftest.err; then
2832    grep -v '^ *+' conftest.err >conftest.er1
2833    cat conftest.er1 >&5
2834    mv -f conftest.er1 conftest.err
2835  fi
2836  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2837  test $ac_status = 0; } && {
2838	 test -z "$ac_cxx_werror_flag" ||
2839	 test ! -s conftest.err
2840       } && test -s conftest$ac_exeext && {
2841	 test "$cross_compiling" = yes ||
2842	 test -x conftest$ac_exeext
2843       }; then :
2844  ac_retval=0
2845else
2846  $as_echo "$as_me: failed program was:" >&5
2847sed 's/^/| /' conftest.$ac_ext >&5
2848
2849	ac_retval=1
2850fi
2851  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2852  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2853  # interfere with the next link command; also delete a directory that is
2854  # left behind by Apple's compiler.  We do this before executing the actions.
2855  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2856  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2857  as_fn_set_status $ac_retval
2858
2859} # ac_fn_cxx_try_link
2860
2861# ac_fn_cxx_check_func LINENO FUNC VAR
2862# ------------------------------------
2863# Tests whether FUNC exists, setting the cache variable VAR accordingly
2864ac_fn_cxx_check_func ()
2865{
2866  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2868$as_echo_n "checking for $2... " >&6; }
2869if eval \${$3+:} false; then :
2870  $as_echo_n "(cached) " >&6
2871else
2872  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2873/* end confdefs.h.  */
2874/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2875   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2876#define $2 innocuous_$2
2877
2878/* System header to define __stub macros and hopefully few prototypes,
2879    which can conflict with char $2 (); below.
2880    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2881    <limits.h> exists even on freestanding compilers.  */
2882
2883#ifdef __STDC__
2884# include <limits.h>
2885#else
2886# include <assert.h>
2887#endif
2888
2889#undef $2
2890
2891/* Override any GCC internal prototype to avoid an error.
2892   Use char because int might match the return type of a GCC
2893   builtin and then its argument prototype would still apply.  */
2894#ifdef __cplusplus
2895extern "C"
2896#endif
2897char $2 ();
2898/* The GNU C library defines this for functions which it implements
2899    to always fail with ENOSYS.  Some functions are actually named
2900    something starting with __ and the normal name is an alias.  */
2901#if defined __stub_$2 || defined __stub___$2
2902choke me
2903#endif
2904
2905int
2906main ()
2907{
2908return $2 ();
2909  ;
2910  return 0;
2911}
2912_ACEOF
2913if ac_fn_cxx_try_link "$LINENO"; then :
2914  eval "$3=yes"
2915else
2916  eval "$3=no"
2917fi
2918rm -f core conftest.err conftest.$ac_objext \
2919    conftest$ac_exeext conftest.$ac_ext
2920fi
2921eval ac_res=\$$3
2922	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2923$as_echo "$ac_res" >&6; }
2924  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2925
2926} # ac_fn_cxx_check_func
2927
2928# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2929# -------------------------------------------------------
2930# Tests whether HEADER exists and can be compiled using the include files in
2931# INCLUDES, setting the cache variable VAR accordingly.
2932ac_fn_c_check_header_compile ()
2933{
2934  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2935  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2936$as_echo_n "checking for $2... " >&6; }
2937if eval \${$3+:} false; then :
2938  $as_echo_n "(cached) " >&6
2939else
2940  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2941/* end confdefs.h.  */
2942$4
2943#include <$2>
2944_ACEOF
2945if ac_fn_c_try_compile "$LINENO"; then :
2946  eval "$3=yes"
2947else
2948  eval "$3=no"
2949fi
2950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2951fi
2952eval ac_res=\$$3
2953	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2954$as_echo "$ac_res" >&6; }
2955  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2956
2957} # ac_fn_c_check_header_compile
2958cat >config.log <<_ACEOF
2959This file contains any messages produced by compilers while
2960running configure, to aid debugging if configure makes a mistake.
2961
2962It was created by OpenJDK $as_me jdk9, which was
2963generated by GNU Autoconf 2.69.  Invocation command line was
2964
2965  $ $0 $@
2966
2967_ACEOF
2968exec 5>>config.log
2969{
2970cat <<_ASUNAME
2971## --------- ##
2972## Platform. ##
2973## --------- ##
2974
2975hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2976uname -m = `(uname -m) 2>/dev/null || echo unknown`
2977uname -r = `(uname -r) 2>/dev/null || echo unknown`
2978uname -s = `(uname -s) 2>/dev/null || echo unknown`
2979uname -v = `(uname -v) 2>/dev/null || echo unknown`
2980
2981/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2982/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2983
2984/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2985/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2986/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2987/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2988/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2989/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2990/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2991
2992_ASUNAME
2993
2994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2995for as_dir in $PATH
2996do
2997  IFS=$as_save_IFS
2998  test -z "$as_dir" && as_dir=.
2999    $as_echo "PATH: $as_dir"
3000  done
3001IFS=$as_save_IFS
3002
3003} >&5
3004
3005cat >&5 <<_ACEOF
3006
3007
3008## ----------- ##
3009## Core tests. ##
3010## ----------- ##
3011
3012_ACEOF
3013
3014
3015# Keep a trace of the command line.
3016# Strip out --no-create and --no-recursion so they do not pile up.
3017# Strip out --silent because we don't want to record it for future runs.
3018# Also quote any args containing shell meta-characters.
3019# Make two passes to allow for proper duplicate-argument suppression.
3020ac_configure_args=
3021ac_configure_args0=
3022ac_configure_args1=
3023ac_must_keep_next=false
3024for ac_pass in 1 2
3025do
3026  for ac_arg
3027  do
3028    case $ac_arg in
3029    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3030    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3031    | -silent | --silent | --silen | --sile | --sil)
3032      continue ;;
3033    *\'*)
3034      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3035    esac
3036    case $ac_pass in
3037    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3038    2)
3039      as_fn_append ac_configure_args1 " '$ac_arg'"
3040      if test $ac_must_keep_next = true; then
3041	ac_must_keep_next=false # Got value, back to normal.
3042      else
3043	case $ac_arg in
3044	  *=* | --config-cache | -C | -disable-* | --disable-* \
3045	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3046	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3047	  | -with-* | --with-* | -without-* | --without-* | --x)
3048	    case "$ac_configure_args0 " in
3049	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3050	    esac
3051	    ;;
3052	  -* ) ac_must_keep_next=true ;;
3053	esac
3054      fi
3055      as_fn_append ac_configure_args " '$ac_arg'"
3056      ;;
3057    esac
3058  done
3059done
3060{ ac_configure_args0=; unset ac_configure_args0;}
3061{ ac_configure_args1=; unset ac_configure_args1;}
3062
3063# When interrupted or exit'd, cleanup temporary files, and complete
3064# config.log.  We remove comments because anyway the quotes in there
3065# would cause problems or look ugly.
3066# WARNING: Use '\'' to represent an apostrophe within the trap.
3067# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3068trap 'exit_status=$?
3069  # Save into config.log some information that might help in debugging.
3070  {
3071    echo
3072
3073    $as_echo "## ---------------- ##
3074## Cache variables. ##
3075## ---------------- ##"
3076    echo
3077    # The following way of writing the cache mishandles newlines in values,
3078(
3079  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3080    eval ac_val=\$$ac_var
3081    case $ac_val in #(
3082    *${as_nl}*)
3083      case $ac_var in #(
3084      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3085$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3086      esac
3087      case $ac_var in #(
3088      _ | IFS | as_nl) ;; #(
3089      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3090      *) { eval $ac_var=; unset $ac_var;} ;;
3091      esac ;;
3092    esac
3093  done
3094  (set) 2>&1 |
3095    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3096    *${as_nl}ac_space=\ *)
3097      sed -n \
3098	"s/'\''/'\''\\\\'\'''\''/g;
3099	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3100      ;; #(
3101    *)
3102      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3103      ;;
3104    esac |
3105    sort
3106)
3107    echo
3108
3109    $as_echo "## ----------------- ##
3110## Output variables. ##
3111## ----------------- ##"
3112    echo
3113    for ac_var in $ac_subst_vars
3114    do
3115      eval ac_val=\$$ac_var
3116      case $ac_val in
3117      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3118      esac
3119      $as_echo "$ac_var='\''$ac_val'\''"
3120    done | sort
3121    echo
3122
3123    if test -n "$ac_subst_files"; then
3124      $as_echo "## ------------------- ##
3125## File substitutions. ##
3126## ------------------- ##"
3127      echo
3128      for ac_var in $ac_subst_files
3129      do
3130	eval ac_val=\$$ac_var
3131	case $ac_val in
3132	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3133	esac
3134	$as_echo "$ac_var='\''$ac_val'\''"
3135      done | sort
3136      echo
3137    fi
3138
3139    if test -s confdefs.h; then
3140      $as_echo "## ----------- ##
3141## confdefs.h. ##
3142## ----------- ##"
3143      echo
3144      cat confdefs.h
3145      echo
3146    fi
3147    test "$ac_signal" != 0 &&
3148      $as_echo "$as_me: caught signal $ac_signal"
3149    $as_echo "$as_me: exit $exit_status"
3150  } >&5
3151  rm -f core *.core core.conftest.* &&
3152    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3153    exit $exit_status
3154' 0
3155for ac_signal in 1 2 13 15; do
3156  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3157done
3158ac_signal=0
3159
3160# confdefs.h avoids OS command line length limits that DEFS can exceed.
3161rm -f -r conftest* confdefs.h
3162
3163$as_echo "/* confdefs.h */" > confdefs.h
3164
3165# Predefined preprocessor variables.
3166
3167cat >>confdefs.h <<_ACEOF
3168#define PACKAGE_NAME "$PACKAGE_NAME"
3169_ACEOF
3170
3171cat >>confdefs.h <<_ACEOF
3172#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3173_ACEOF
3174
3175cat >>confdefs.h <<_ACEOF
3176#define PACKAGE_VERSION "$PACKAGE_VERSION"
3177_ACEOF
3178
3179cat >>confdefs.h <<_ACEOF
3180#define PACKAGE_STRING "$PACKAGE_STRING"
3181_ACEOF
3182
3183cat >>confdefs.h <<_ACEOF
3184#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3185_ACEOF
3186
3187cat >>confdefs.h <<_ACEOF
3188#define PACKAGE_URL "$PACKAGE_URL"
3189_ACEOF
3190
3191
3192# Let the site file select an alternate cache file if it wants to.
3193# Prefer an explicitly selected file to automatically selected ones.
3194ac_site_file1=NONE
3195ac_site_file2=NONE
3196if test -n "$CONFIG_SITE"; then
3197  # We do not want a PATH search for config.site.
3198  case $CONFIG_SITE in #((
3199    -*)  ac_site_file1=./$CONFIG_SITE;;
3200    */*) ac_site_file1=$CONFIG_SITE;;
3201    *)   ac_site_file1=./$CONFIG_SITE;;
3202  esac
3203elif test "x$prefix" != xNONE; then
3204  ac_site_file1=$prefix/share/config.site
3205  ac_site_file2=$prefix/etc/config.site
3206else
3207  ac_site_file1=$ac_default_prefix/share/config.site
3208  ac_site_file2=$ac_default_prefix/etc/config.site
3209fi
3210for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3211do
3212  test "x$ac_site_file" = xNONE && continue
3213  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3214    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3215$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3216    sed 's/^/| /' "$ac_site_file" >&5
3217    . "$ac_site_file" \
3218      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3219$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3220as_fn_error $? "failed to load site script $ac_site_file
3221See \`config.log' for more details" "$LINENO" 5; }
3222  fi
3223done
3224
3225if test -r "$cache_file"; then
3226  # Some versions of bash will fail to source /dev/null (special files
3227  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3228  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3229    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3230$as_echo "$as_me: loading cache $cache_file" >&6;}
3231    case $cache_file in
3232      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3233      *)                      . "./$cache_file";;
3234    esac
3235  fi
3236else
3237  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3238$as_echo "$as_me: creating cache $cache_file" >&6;}
3239  >$cache_file
3240fi
3241
3242# Check that the precious variables saved in the cache have kept the same
3243# value.
3244ac_cache_corrupted=false
3245for ac_var in $ac_precious_vars; do
3246  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3247  eval ac_new_set=\$ac_env_${ac_var}_set
3248  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3249  eval ac_new_val=\$ac_env_${ac_var}_value
3250  case $ac_old_set,$ac_new_set in
3251    set,)
3252      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3253$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3254      ac_cache_corrupted=: ;;
3255    ,set)
3256      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3257$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3258      ac_cache_corrupted=: ;;
3259    ,);;
3260    *)
3261      if test "x$ac_old_val" != "x$ac_new_val"; then
3262	# differences in whitespace do not lead to failure.
3263	ac_old_val_w=`echo x $ac_old_val`
3264	ac_new_val_w=`echo x $ac_new_val`
3265	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3266	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3267$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3268	  ac_cache_corrupted=:
3269	else
3270	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3271$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3272	  eval $ac_var=\$ac_old_val
3273	fi
3274	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3275$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3276	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3277$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3278      fi;;
3279  esac
3280  # Pass precious variables to config.status.
3281  if test "$ac_new_set" = set; then
3282    case $ac_new_val in
3283    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3284    *) ac_arg=$ac_var=$ac_new_val ;;
3285    esac
3286    case " $ac_configure_args " in
3287      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3288      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3289    esac
3290  fi
3291done
3292if $ac_cache_corrupted; then
3293  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3294$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3295  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3296$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3297  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3298fi
3299## -------------------- ##
3300## Main body of script. ##
3301## -------------------- ##
3302
3303ac_ext=c
3304ac_cpp='$CPP $CPPFLAGS'
3305ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3306ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3307ac_compiler_gnu=$ac_cv_c_compiler_gnu
3308
3309
3310
3311ac_aux_dir=
3312for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3313  if 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/install.sh"; then
3318    ac_aux_dir=$ac_dir
3319    ac_install_sh="$ac_aux_dir/install.sh -c"
3320    break
3321  elif test -f "$ac_dir/shtool"; then
3322    ac_aux_dir=$ac_dir
3323    ac_install_sh="$ac_aux_dir/shtool install -c"
3324    break
3325  fi
3326done
3327if test -z "$ac_aux_dir"; then
3328  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
3329fi
3330
3331# These three variables are undocumented and unsupported,
3332# and are intended to be withdrawn in a future Autoconf release.
3333# They can cause serious problems if a builder's source tree is in a directory
3334# whose full name contains unusual characters.
3335ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3336ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3337ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3338
3339
3340# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3341
3342#
3343# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3344# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3345#
3346# This code is free software; you can redistribute it and/or modify it
3347# under the terms of the GNU General Public License version 2 only, as
3348# published by the Free Software Foundation.  Oracle designates this
3349# particular file as subject to the "Classpath" exception as provided
3350# by Oracle in the LICENSE file that accompanied this code.
3351#
3352# This code is distributed in the hope that it will be useful, but WITHOUT
3353# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3354# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3355# version 2 for more details (a copy is included in the LICENSE file that
3356# accompanied this code).
3357#
3358# You should have received a copy of the GNU General Public License version
3359# 2 along with this work; if not, write to the Free Software Foundation,
3360# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3361#
3362# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3363# or visit www.oracle.com if you need additional information or have any
3364# questions.
3365#
3366
3367#
3368# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3369#
3370# This program is free software; you can redistribute it and/or modify
3371# it under the terms of the GNU General Public License as published by
3372# the Free Software Foundation; either version 2 of the License, or
3373# (at your option) any later version.
3374#
3375# This program is distributed in the hope that it will be useful, but
3376# WITHOUT ANY WARRANTY; without even the implied warranty of
3377# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3378# General Public License for more details.
3379#
3380# You should have received a copy of the GNU General Public License
3381# along with this program; if not, write to the Free Software
3382# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3383#
3384# As a special exception to the GNU General Public License, if you
3385# distribute this file as part of a program that contains a
3386# configuration script generated by Autoconf, you may include it under
3387# the same distribution terms that you use for the rest of that program.
3388
3389# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3390# ----------------------------------
3391# PKG_PROG_PKG_CONFIG
3392
3393# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3394#
3395# Check to see whether a particular set of modules exists.  Similar
3396# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3397#
3398#
3399# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3400# this or PKG_CHECK_MODULES is called, or make sure to call
3401# PKG_CHECK_EXISTS manually
3402# --------------------------------------------------------------
3403
3404
3405
3406# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3407# ---------------------------------------------
3408# _PKG_CONFIG
3409
3410# _PKG_SHORT_ERRORS_SUPPORTED
3411# -----------------------------
3412# _PKG_SHORT_ERRORS_SUPPORTED
3413
3414
3415# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3416# [ACTION-IF-NOT-FOUND])
3417#
3418#
3419# Note that if there is a possibility the first call to
3420# PKG_CHECK_MODULES might not happen, you should be sure to include an
3421# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3422#
3423#
3424# --------------------------------------------------------------
3425# PKG_CHECK_MODULES
3426
3427
3428# Include these first...
3429#
3430# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3431# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3432#
3433# This code is free software; you can redistribute it and/or modify it
3434# under the terms of the GNU General Public License version 2 only, as
3435# published by the Free Software Foundation.  Oracle designates this
3436# particular file as subject to the "Classpath" exception as provided
3437# by Oracle in the LICENSE file that accompanied this code.
3438#
3439# This code is distributed in the hope that it will be useful, but WITHOUT
3440# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3441# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3442# version 2 for more details (a copy is included in the LICENSE file that
3443# accompanied this code).
3444#
3445# You should have received a copy of the GNU General Public License version
3446# 2 along with this work; if not, write to the Free Software Foundation,
3447# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3448#
3449# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3450# or visit www.oracle.com if you need additional information or have any
3451# questions.
3452#
3453
3454# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3455# If so, then append $1 to $2 \
3456# Also set JVM_ARG_OK to true/false depending on outcome.
3457
3458
3459# Appends a string to a path variable, only adding the : when needed.
3460
3461
3462# Prepends a string to a path variable, only adding the : when needed.
3463
3464
3465# This will make sure the given variable points to a full and proper
3466# path. This means:
3467# 1) There will be no spaces in the path. On unix platforms,
3468#    spaces in the path will result in an error. On Windows,
3469#    the path will be rewritten using short-style to be space-free.
3470# 2) The path will be absolute, and it will be in unix-style (on
3471#     cygwin).
3472# $1: The name of the variable to fix
3473
3474
3475# This will make sure the given variable points to a executable
3476# with a full and proper path. This means:
3477# 1) There will be no spaces in the path. On unix platforms,
3478#    spaces in the path will result in an error. On Windows,
3479#    the path will be rewritten using short-style to be space-free.
3480# 2) The path will be absolute, and it will be in unix-style (on
3481#     cygwin).
3482# Any arguments given to the executable is preserved.
3483# If the input variable does not have a directory specification, then
3484# it need to be in the PATH.
3485# $1: The name of the variable to fix
3486
3487
3488
3489
3490# Register a --with argument but mark it as deprecated
3491# $1: The name of the with argument to deprecate, not including --with-
3492
3493
3494# Register a --enable argument but mark it as deprecated
3495# $1: The name of the with argument to deprecate, not including --enable-
3496# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3497# $3: Messages to user.
3498
3499
3500
3501
3502# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3503# $1: variable to check
3504
3505
3506# Check that there are no unprocessed overridden variables left.
3507# If so, they are an incorrect argument and we will exit with an error.
3508
3509
3510# Setup a tool for the given variable. If correctly specified by the user,
3511# use that value, otherwise search for the tool using the supplied code snippet.
3512# $1: variable to set
3513# $2: code snippet to call to look for the tool
3514# $3: code snippet to call if variable was used to find tool
3515
3516
3517# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3518# $1: variable to set
3519# $2: executable name (or list of names) to look for
3520
3521
3522# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3523# $1: variable to set
3524# $2: executable name (or list of names) to look for
3525
3526
3527# Like BASIC_PATH_PROGS but fails if no tool was found.
3528# $1: variable to set
3529# $2: executable name (or list of names) to look for
3530
3531
3532# Like BASIC_SETUP_TOOL but fails if no tool was found.
3533# $1: variable to set
3534# $2: autoconf macro to call to look for the special tool
3535
3536
3537# Setup the most fundamental tools that relies on not much else to set up,
3538# but is used by much of the early bootstrap code.
3539
3540
3541# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3542
3543
3544# Evaluates platform specific overrides for devkit variables.
3545# $1: Name of variable
3546
3547
3548
3549
3550
3551
3552#%%% Simple tools %%%
3553
3554# Check if we have found a usable version of make
3555# $1: the path to a potential make binary (or empty)
3556# $2: the description on how we found this
3557
3558
3559
3560
3561# Goes looking for a usable version of GNU make.
3562
3563
3564
3565
3566
3567
3568# Check if build directory is on local disk. If not possible to determine,
3569# we prefer to claim it's local.
3570# Argument 1: directory to test
3571# Argument 2: what to do if it is on local disk
3572# Argument 3: what to do otherwise (remote disk or failure)
3573
3574
3575# Check that source files have basic read permissions set. This might
3576# not be the case in cygwin in certain conditions.
3577
3578
3579
3580
3581# Check for support for specific options in bash
3582
3583
3584################################################################################
3585#
3586# Default make target
3587#
3588
3589
3590# Code to run after AC_OUTPUT
3591
3592
3593#
3594# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3595# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3596#
3597# This code is free software; you can redistribute it and/or modify it
3598# under the terms of the GNU General Public License version 2 only, as
3599# published by the Free Software Foundation.  Oracle designates this
3600# particular file as subject to the "Classpath" exception as provided
3601# by Oracle in the LICENSE file that accompanied this code.
3602#
3603# This code is distributed in the hope that it will be useful, but WITHOUT
3604# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3605# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3606# version 2 for more details (a copy is included in the LICENSE file that
3607# accompanied this code).
3608#
3609# You should have received a copy of the GNU General Public License version
3610# 2 along with this work; if not, write to the Free Software Foundation,
3611# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3612#
3613# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3614# or visit www.oracle.com if you need additional information or have any
3615# questions.
3616#
3617
3618
3619
3620
3621
3622# Helper function which possibly converts a path using DOS-style short mode.
3623# If so, the updated path is stored in $new_path.
3624# $1: The path to check
3625
3626
3627# Helper function which possibly converts a path using DOS-style short mode.
3628# If so, the updated path is stored in $new_path.
3629# $1: The path to check
3630
3631
3632# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3633# and could probably be heavily simplified. However, all changes in this
3634# area tend to need lot of testing in different scenarios, and in lack of
3635# proper unit testing, cleaning this up has not been deemed worth the effort
3636# at the moment.
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3647
3648
3649
3650
3651# ... then the rest
3652#
3653# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3654# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3655#
3656# This code is free software; you can redistribute it and/or modify it
3657# under the terms of the GNU General Public License version 2 only, as
3658# published by the Free Software Foundation.  Oracle designates this
3659# particular file as subject to the "Classpath" exception as provided
3660# by Oracle in the LICENSE file that accompanied this code.
3661#
3662# This code is distributed in the hope that it will be useful, but WITHOUT
3663# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3664# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3665# version 2 for more details (a copy is included in the LICENSE file that
3666# accompanied this code).
3667#
3668# You should have received a copy of the GNU General Public License version
3669# 2 along with this work; if not, write to the Free Software Foundation,
3670# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3671#
3672# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3673# or visit www.oracle.com if you need additional information or have any
3674# questions.
3675#
3676
3677########################################################################
3678# This file handles detection of the Boot JDK. The Boot JDK detection
3679# process has been developed as a response to solve a complex real-world
3680# problem. Initially, it was simple, but it has grown as platform after
3681# platform, idiosyncracy after idiosyncracy has been supported.
3682#
3683# The basic idea is this:
3684# 1) You need an acceptable *) JDK to use as a Boot JDK
3685# 2) There are several ways to locate a JDK, that are mostly platform
3686#    dependent **)
3687# 3) You can have multiple JDKs installed
3688# 4) If possible, configure should try to dig out an acceptable JDK
3689#    automatically, without having to resort to command-line options
3690#
3691# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3692#     javac) and not a JRE, etc.
3693#
3694# **) On Windows we typically use a well-known path.
3695#     On MacOSX we typically use the tool java_home.
3696#     On Linux we typically find javac in the $PATH, and then follow a
3697#     chain of symlinks that often ends up in a real JDK.
3698#
3699# This leads to the code where we check in different ways to locate a
3700# JDK, and if one is found, check if it is acceptable. If not, we print
3701# our reasons for rejecting it (useful when debugging non-working
3702# configure situations) and continue checking the next one.
3703########################################################################
3704
3705# Execute the check given as argument, and verify the result
3706# If the Boot JDK was previously found, do nothing
3707# $1 A command line (typically autoconf macro) to execute
3708
3709
3710# Test: Is bootjdk explicitely set by command line arguments?
3711
3712
3713# Test: Is $JAVA_HOME set?
3714
3715
3716# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3717
3718
3719# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3720# $1: Argument to the java_home binary (optional)
3721
3722
3723# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3724
3725
3726# Look for a jdk in the given path. If there are multiple, try to select the newest.
3727# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3728# $1 = Path to directory containing jdk installations.
3729# $2 = String to append to the found JDK directory to get the proper JDK home
3730
3731
3732# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3733# environmental variable as base for where to look.
3734# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3735
3736
3737# Test: Is there a JDK installed in default, well-known locations?
3738
3739
3740# Check that a command-line tool in the Boot JDK is correct
3741# $1 = name of variable to assign
3742# $2 = name of binary
3743
3744
3745###############################################################################
3746#
3747# We need a Boot JDK to bootstrap the build.
3748#
3749
3750
3751
3752
3753
3754#
3755# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3756# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3757#
3758# This code is free software; you can redistribute it and/or modify it
3759# under the terms of the GNU General Public License version 2 only, as
3760# published by the Free Software Foundation.  Oracle designates this
3761# particular file as subject to the "Classpath" exception as provided
3762# by Oracle in the LICENSE file that accompanied this code.
3763#
3764# This code is distributed in the hope that it will be useful, but WITHOUT
3765# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3766# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3767# version 2 for more details (a copy is included in the LICENSE file that
3768# accompanied this code).
3769#
3770# You should have received a copy of the GNU General Public License version
3771# 2 along with this work; if not, write to the Free Software Foundation,
3772# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3773#
3774# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3775# or visit www.oracle.com if you need additional information or have any
3776# questions.
3777#
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795################################################################################
3796#
3797# Optionally enable distributed compilation of native code using icecc/icecream
3798#
3799
3800
3801
3802
3803
3804
3805
3806#
3807# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3808# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3809#
3810# This code is free software; you can redistribute it and/or modify it
3811# under the terms of the GNU General Public License version 2 only, as
3812# published by the Free Software Foundation.  Oracle designates this
3813# particular file as subject to the "Classpath" exception as provided
3814# by Oracle in the LICENSE file that accompanied this code.
3815#
3816# This code is distributed in the hope that it will be useful, but WITHOUT
3817# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3818# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3819# version 2 for more details (a copy is included in the LICENSE file that
3820# accompanied this code).
3821#
3822# You should have received a copy of the GNU General Public License version
3823# 2 along with this work; if not, write to the Free Software Foundation,
3824# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3825#
3826# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3827# or visit www.oracle.com if you need additional information or have any
3828# questions.
3829#
3830
3831# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3832# corresponding configure arguments instead
3833
3834
3835# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3836# that configure can use them while detecting compilers.
3837# TOOLCHAIN_TYPE is available here.
3838# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3839
3840
3841
3842
3843
3844
3845# Documentation on common flags used for solstudio in HIGHEST.
3846#
3847# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3848#          done with care, there are some assumptions below that need to
3849#          be understood about the use of pointers, and IEEE behavior.
3850#
3851# -fns: Use non-standard floating point mode (not IEEE 754)
3852# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3853# -fsingle: Use single precision floating point with 'float'
3854# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3855#   (Source with excessing pointer casting and data access with mixed
3856#    pointer types are not recommended)
3857# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3858#   (If you expect perfect errno behavior, do not use this)
3859# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3860# -xrestrict: Pointer parameters to functions do not overlap
3861#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3862#    If you pass in multiple pointers to the same data, do not use this)
3863# -xlibmil: Inline some library routines
3864#   (If you expect perfect errno behavior, do not use this)
3865# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3866#   (If you expect perfect errno behavior, do not use this)
3867#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3868
3869    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3870    # Bug?
3871    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3872    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3873    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3874    #fi
3875
3876
3877
3878
3879
3880# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3881#                                   [RUN-IF-FALSE])
3882# ------------------------------------------------------------
3883# Check that the c and c++ compilers support an argument
3884
3885
3886# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3887#                                    [RUN-IF-FALSE])
3888# ------------------------------------------------------------
3889# Check that the linker support an argument
3890
3891
3892
3893
3894#
3895# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3896# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3897#
3898# This code is free software; you can redistribute it and/or modify it
3899# under the terms of the GNU General Public License version 2 only, as
3900# published by the Free Software Foundation.  Oracle designates this
3901# particular file as subject to the "Classpath" exception as provided
3902# by Oracle in the LICENSE file that accompanied this code.
3903#
3904# This code is distributed in the hope that it will be useful, but WITHOUT
3905# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3906# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3907# version 2 for more details (a copy is included in the LICENSE file that
3908# accompanied this code).
3909#
3910# You should have received a copy of the GNU General Public License version
3911# 2 along with this work; if not, write to the Free Software Foundation,
3912# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3913#
3914# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3915# or visit www.oracle.com if you need additional information or have any
3916# questions.
3917#
3918
3919
3920
3921
3922
3923cygwin_help() {
3924  case $1 in
3925    unzip)
3926      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3927      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3928      ;;
3929    zip)
3930      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3931      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3932      ;;
3933    make)
3934      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3935      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3936      ;;
3937    freetype)
3938      HELP_MSG="
3939The freetype library can now be build during the configure process.
3940Download the freetype sources and unpack them into an arbitrary directory:
3941
3942wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3943tar -xzf freetype-2.5.3.tar.gz
3944
3945Then run configure with '--with-freetype-src=<freetype_src>'. This will
3946automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3947builds or into '<freetype_src>/lib32' for 32-bit builds.
3948Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3949and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
3950
3951Alternatively you can unpack the sources like this to use the default directory:
3952
3953tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
3954      ;;
3955  esac
3956}
3957
3958msys_help() {
3959  PKGHANDLER_COMMAND=""
3960}
3961
3962apt_help() {
3963  case $1 in
3964    reduced)
3965      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3966    devkit)
3967      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3968    openjdk)
3969      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3970    alsa)
3971      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3972    cups)
3973      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3974    freetype)
3975      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3976    ffi)
3977      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3978    x11)
3979      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3980    ccache)
3981      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3982  esac
3983}
3984
3985yum_help() {
3986  case $1 in
3987    devkit)
3988      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3989    openjdk)
3990      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3991    alsa)
3992      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3993    cups)
3994      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3995    freetype)
3996      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3997    x11)
3998      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3999    ccache)
4000      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4001  esac
4002}
4003
4004port_help() {
4005  PKGHANDLER_COMMAND=""
4006}
4007
4008pkgutil_help() {
4009  PKGHANDLER_COMMAND=""
4010}
4011
4012pkgadd_help() {
4013  PKGHANDLER_COMMAND=""
4014}
4015
4016# This function will check if we're called from the "configure" wrapper while
4017# printing --help. If so, we will print out additional information that can
4018# only be extracted within the autoconf script, and then exit. This must be
4019# called at the very beginning in configure.ac.
4020
4021
4022
4023
4024
4025
4026#
4027# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4028# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4029#
4030# This code is free software; you can redistribute it and/or modify it
4031# under the terms of the GNU General Public License version 2 only, as
4032# published by the Free Software Foundation.  Oracle designates this
4033# particular file as subject to the "Classpath" exception as provided
4034# by Oracle in the LICENSE file that accompanied this code.
4035#
4036# This code is distributed in the hope that it will be useful, but WITHOUT
4037# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4038# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4039# version 2 for more details (a copy is included in the LICENSE file that
4040# accompanied this code).
4041#
4042# You should have received a copy of the GNU General Public License version
4043# 2 along with this work; if not, write to the Free Software Foundation,
4044# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4045#
4046# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4047# or visit www.oracle.com if you need additional information or have any
4048# questions.
4049#
4050
4051###############################################################################
4052# Check which interpreter of the JVM we want to build.
4053# Currently we have:
4054#    template: Template interpreter (the default)
4055#    cpp     : C++ interpreter
4056
4057
4058###############################################################################
4059# Check which variants of the JVM that we want to build.
4060# Currently we have:
4061#    server: normal interpreter and a C2 or tiered C1/C2 compiler
4062#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
4063#    minimal1: reduced form of client with optional VM services and features stripped out
4064#    zero: no machine code interpreter, no compiler
4065#    zeroshark: zero interpreter and shark/llvm compiler backend
4066#    core: interpreter only, no compiler (only works on some platforms)
4067
4068
4069
4070###############################################################################
4071# Setup legacy vars/targets and new vars to deal with different debug levels.
4072#
4073#    release: no debug information, all optimizations, no asserts.
4074#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4075#    fastdebug: debug information (-g), all optimizations, all asserts
4076#    slowdebug: debug information (-g), no optimizations, all asserts
4077#
4078
4079
4080
4081
4082
4083
4084#
4085# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4086# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4087#
4088# This code is free software; you can redistribute it and/or modify it
4089# under the terms of the GNU General Public License version 2 only, as
4090# published by the Free Software Foundation.  Oracle designates this
4091# particular file as subject to the "Classpath" exception as provided
4092# by Oracle in the LICENSE file that accompanied this code.
4093#
4094# This code is distributed in the hope that it will be useful, but WITHOUT
4095# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4096# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4097# version 2 for more details (a copy is included in the LICENSE file that
4098# accompanied this code).
4099#
4100# You should have received a copy of the GNU General Public License version
4101# 2 along with this work; if not, write to the Free Software Foundation,
4102# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4103#
4104# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4105# or visit www.oracle.com if you need additional information or have any
4106# questions.
4107#
4108
4109###############################################################################
4110# Check which variant of the JDK that we want to build.
4111# Currently we have:
4112#    normal:   standard edition
4113# but the custom make system may add other variants
4114#
4115# Effectively the JDK variant gives a name to a specific set of
4116# modules to compile into the JDK.
4117
4118
4119###############################################################################
4120# Set the debug level
4121#    release: no debug information, all optimizations, no asserts.
4122#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4123#    fastdebug: debug information (-g), all optimizations, all asserts
4124#    slowdebug: debug information (-g), no optimizations, all asserts
4125
4126
4127###############################################################################
4128#
4129# Should we build only OpenJDK even if closed sources are present?
4130#
4131
4132
4133
4134
4135###############################################################################
4136#
4137# Enable or disable the elliptic curve crypto implementation
4138#
4139
4140
4141
4142
4143################################################################################
4144#
4145# Gcov coverage data for hotspot
4146#
4147
4148
4149################################################################################
4150#
4151# Static build support.  When enabled will generate static
4152# libraries instead of shared libraries for all JDK libs.
4153#
4154
4155
4156#
4157# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4158# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4159#
4160# This code is free software; you can redistribute it and/or modify it
4161# under the terms of the GNU General Public License version 2 only, as
4162# published by the Free Software Foundation.  Oracle designates this
4163# particular file as subject to the "Classpath" exception as provided
4164# by Oracle in the LICENSE file that accompanied this code.
4165#
4166# This code is distributed in the hope that it will be useful, but WITHOUT
4167# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4168# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4169# version 2 for more details (a copy is included in the LICENSE file that
4170# accompanied this code).
4171#
4172# You should have received a copy of the GNU General Public License version
4173# 2 along with this work; if not, write to the Free Software Foundation,
4174# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4175#
4176# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4177# or visit www.oracle.com if you need additional information or have any
4178# questions.
4179#
4180
4181###############################################################################
4182#
4183# Setup version numbers
4184#
4185
4186# Verify that a given string represents a valid version number, and assign it
4187# to a variable.
4188
4189# Argument 1: the variable to assign to
4190# Argument 2: the value given by the user
4191
4192
4193
4194
4195#
4196# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4197# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4198#
4199# This code is free software; you can redistribute it and/or modify it
4200# under the terms of the GNU General Public License version 2 only, as
4201# published by the Free Software Foundation.  Oracle designates this
4202# particular file as subject to the "Classpath" exception as provided
4203# by Oracle in the LICENSE file that accompanied this code.
4204#
4205# This code is distributed in the hope that it will be useful, but WITHOUT
4206# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4207# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4208# version 2 for more details (a copy is included in the LICENSE file that
4209# accompanied this code).
4210#
4211# You should have received a copy of the GNU General Public License version
4212# 2 along with this work; if not, write to the Free Software Foundation,
4213# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4214#
4215# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4216# or visit www.oracle.com if you need additional information or have any
4217# questions.
4218#
4219
4220# Major library component reside in separate files.
4221#
4222# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4223# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4224#
4225# This code is free software; you can redistribute it and/or modify it
4226# under the terms of the GNU General Public License version 2 only, as
4227# published by the Free Software Foundation.  Oracle designates this
4228# particular file as subject to the "Classpath" exception as provided
4229# by Oracle in the LICENSE file that accompanied this code.
4230#
4231# This code is distributed in the hope that it will be useful, but WITHOUT
4232# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4233# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4234# version 2 for more details (a copy is included in the LICENSE file that
4235# accompanied this code).
4236#
4237# You should have received a copy of the GNU General Public License version
4238# 2 along with this work; if not, write to the Free Software Foundation,
4239# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4240#
4241# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4242# or visit www.oracle.com if you need additional information or have any
4243# questions.
4244#
4245
4246################################################################################
4247# Setup alsa (Advanced Linux Sound Architecture)
4248################################################################################
4249
4250
4251#
4252# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4253# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4254#
4255# This code is free software; you can redistribute it and/or modify it
4256# under the terms of the GNU General Public License version 2 only, as
4257# published by the Free Software Foundation.  Oracle designates this
4258# particular file as subject to the "Classpath" exception as provided
4259# by Oracle in the LICENSE file that accompanied this code.
4260#
4261# This code is distributed in the hope that it will be useful, but WITHOUT
4262# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4263# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4264# version 2 for more details (a copy is included in the LICENSE file that
4265# accompanied this code).
4266#
4267# You should have received a copy of the GNU General Public License version
4268# 2 along with this work; if not, write to the Free Software Foundation,
4269# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4270#
4271# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4272# or visit www.oracle.com if you need additional information or have any
4273# questions.
4274#
4275
4276################################################################################
4277# Setup bundled libraries.
4278#
4279# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4280# OpenJDK repository. Default is to use these libraries as bundled, but they
4281# might be replaced by en external version by the user.
4282################################################################################
4283
4284
4285################################################################################
4286# Setup libjpeg
4287################################################################################
4288
4289
4290################################################################################
4291# Setup giflib
4292################################################################################
4293
4294
4295################################################################################
4296# Setup libpng
4297################################################################################
4298
4299
4300################################################################################
4301# Setup zlib
4302################################################################################
4303
4304
4305################################################################################
4306# Setup lcms (Little CMS)
4307################################################################################
4308
4309
4310#
4311# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4312# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4313#
4314# This code is free software; you can redistribute it and/or modify it
4315# under the terms of the GNU General Public License version 2 only, as
4316# published by the Free Software Foundation.  Oracle designates this
4317# particular file as subject to the "Classpath" exception as provided
4318# by Oracle in the LICENSE file that accompanied this code.
4319#
4320# This code is distributed in the hope that it will be useful, but WITHOUT
4321# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4322# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4323# version 2 for more details (a copy is included in the LICENSE file that
4324# accompanied this code).
4325#
4326# You should have received a copy of the GNU General Public License version
4327# 2 along with this work; if not, write to the Free Software Foundation,
4328# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4329#
4330# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4331# or visit www.oracle.com if you need additional information or have any
4332# questions.
4333#
4334
4335################################################################################
4336# Setup cups (Common Unix Printing System)
4337################################################################################
4338
4339
4340#
4341# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4342# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4343#
4344# This code is free software; you can redistribute it and/or modify it
4345# under the terms of the GNU General Public License version 2 only, as
4346# published by the Free Software Foundation.  Oracle designates this
4347# particular file as subject to the "Classpath" exception as provided
4348# by Oracle in the LICENSE file that accompanied this code.
4349#
4350# This code is distributed in the hope that it will be useful, but WITHOUT
4351# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4352# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4353# version 2 for more details (a copy is included in the LICENSE file that
4354# accompanied this code).
4355#
4356# You should have received a copy of the GNU General Public License version
4357# 2 along with this work; if not, write to the Free Software Foundation,
4358# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4359#
4360# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4361# or visit www.oracle.com if you need additional information or have any
4362# questions.
4363#
4364
4365################################################################################
4366# Setup libffi (Foreign Function Interface)
4367################################################################################
4368
4369
4370#
4371# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4372# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4373#
4374# This code is free software; you can redistribute it and/or modify it
4375# under the terms of the GNU General Public License version 2 only, as
4376# published by the Free Software Foundation.  Oracle designates this
4377# particular file as subject to the "Classpath" exception as provided
4378# by Oracle in the LICENSE file that accompanied this code.
4379#
4380# This code is distributed in the hope that it will be useful, but WITHOUT
4381# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4382# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4383# version 2 for more details (a copy is included in the LICENSE file that
4384# accompanied this code).
4385#
4386# You should have received a copy of the GNU General Public License version
4387# 2 along with this work; if not, write to the Free Software Foundation,
4388# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4389#
4390# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4391# or visit www.oracle.com if you need additional information or have any
4392# questions.
4393#
4394
4395################################################################################
4396# Build the freetype lib from source
4397################################################################################
4398
4399
4400################################################################################
4401# Check if a potential freeype library match is correct and usable
4402################################################################################
4403
4404
4405################################################################################
4406# Setup freetype (The FreeType2 font rendering library)
4407################################################################################
4408
4409
4410#
4411# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4412# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4413#
4414# This code is free software; you can redistribute it and/or modify it
4415# under the terms of the GNU General Public License version 2 only, as
4416# published by the Free Software Foundation.  Oracle designates this
4417# particular file as subject to the "Classpath" exception as provided
4418# by Oracle in the LICENSE file that accompanied this code.
4419#
4420# This code is distributed in the hope that it will be useful, but WITHOUT
4421# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4422# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4423# version 2 for more details (a copy is included in the LICENSE file that
4424# accompanied this code).
4425#
4426# You should have received a copy of the GNU General Public License version
4427# 2 along with this work; if not, write to the Free Software Foundation,
4428# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4429#
4430# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4431# or visit www.oracle.com if you need additional information or have any
4432# questions.
4433#
4434
4435################################################################################
4436# Setup the standard C/C++ runtime libraries.
4437#
4438# Most importantly, determine if stdc++ should be linked statically or
4439# dynamically.
4440################################################################################
4441
4442
4443#
4444# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4445# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4446#
4447# This code is free software; you can redistribute it and/or modify it
4448# under the terms of the GNU General Public License version 2 only, as
4449# published by the Free Software Foundation.  Oracle designates this
4450# particular file as subject to the "Classpath" exception as provided
4451# by Oracle in the LICENSE file that accompanied this code.
4452#
4453# This code is distributed in the hope that it will be useful, but WITHOUT
4454# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4455# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4456# version 2 for more details (a copy is included in the LICENSE file that
4457# accompanied this code).
4458#
4459# You should have received a copy of the GNU General Public License version
4460# 2 along with this work; if not, write to the Free Software Foundation,
4461# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4462#
4463# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4464# or visit www.oracle.com if you need additional information or have any
4465# questions.
4466#
4467
4468################################################################################
4469# Setup X11 Windows system
4470################################################################################
4471
4472
4473
4474################################################################################
4475# Determine which libraries are needed for this configuration
4476################################################################################
4477
4478
4479################################################################################
4480# Parse library options, and setup needed libraries
4481################################################################################
4482
4483
4484################################################################################
4485# Setup llvm (Low-Level VM)
4486################################################################################
4487
4488
4489################################################################################
4490# Setup various libraries, typically small system libraries
4491################################################################################
4492
4493
4494#
4495# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4496# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4497#
4498# This code is free software; you can redistribute it and/or modify it
4499# under the terms of the GNU General Public License version 2 only, as
4500# published by the Free Software Foundation.  Oracle designates this
4501# particular file as subject to the "Classpath" exception as provided
4502# by Oracle in the LICENSE file that accompanied this code.
4503#
4504# This code is distributed in the hope that it will be useful, but WITHOUT
4505# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4506# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4507# version 2 for more details (a copy is included in the LICENSE file that
4508# accompanied this code).
4509#
4510# You should have received a copy of the GNU General Public License version
4511# 2 along with this work; if not, write to the Free Software Foundation,
4512# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4513#
4514# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4515# or visit www.oracle.com if you need additional information or have any
4516# questions.
4517#
4518
4519# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4520# Converts autoconf style CPU name to OpenJDK style, into
4521# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4522
4523
4524# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4525# Converts autoconf style OS name to OpenJDK style, into
4526# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4527
4528
4529# Expects $host_os $host_cpu $build_os and $build_cpu
4530# and $with_target_bits to have been setup!
4531#
4532# Translate the standard triplet(quadruplet) definition
4533# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4534# OPENJDK_BUILD_OS, etc.
4535
4536
4537# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4538# accordingly. Must be done after setting up build and target system, but before
4539# doing anything else with these values.
4540
4541
4542# Setup the legacy variables, for controlling the old makefiles.
4543#
4544
4545
4546
4547
4548#%%% Build and target systems %%%
4549
4550
4551
4552
4553# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4554# Add -mX to various FLAGS variables.
4555
4556
4557
4558
4559
4560
4561#
4562# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4563# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4564#
4565# This code is free software; you can redistribute it and/or modify it
4566# under the terms of the GNU General Public License version 2 only, as
4567# published by the Free Software Foundation.  Oracle designates this
4568# particular file as subject to the "Classpath" exception as provided
4569# by Oracle in the LICENSE file that accompanied this code.
4570#
4571# This code is distributed in the hope that it will be useful, but WITHOUT
4572# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4573# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4574# version 2 for more details (a copy is included in the LICENSE file that
4575# accompanied this code).
4576#
4577# You should have received a copy of the GNU General Public License version
4578# 2 along with this work; if not, write to the Free Software Foundation,
4579# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4580#
4581# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4582# or visit www.oracle.com if you need additional information or have any
4583# questions.
4584#
4585
4586
4587
4588
4589
4590
4591
4592#
4593# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4594# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4595#
4596# This code is free software; you can redistribute it and/or modify it
4597# under the terms of the GNU General Public License version 2 only, as
4598# published by the Free Software Foundation.  Oracle designates this
4599# particular file as subject to the "Classpath" exception as provided
4600# by Oracle in the LICENSE file that accompanied this code.
4601#
4602# This code is distributed in the hope that it will be useful, but WITHOUT
4603# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4604# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4605# version 2 for more details (a copy is included in the LICENSE file that
4606# accompanied this code).
4607#
4608# You should have received a copy of the GNU General Public License version
4609# 2 along with this work; if not, write to the Free Software Foundation,
4610# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4611#
4612# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4613# or visit www.oracle.com if you need additional information or have any
4614# questions.
4615#
4616
4617########################################################################
4618# This file is responsible for detecting, verifying and setting up the
4619# toolchain, i.e. the compiler, linker and related utilities. It will setup
4620# proper paths to the binaries, but it will not setup any flags.
4621#
4622# The binaries used is determined by the toolchain type, which is the family of
4623# compilers and related tools that are used.
4624########################################################################
4625
4626
4627# All valid toolchains, regardless of platform (used by help.m4)
4628VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4629
4630# These toolchains are valid on different platforms
4631VALID_TOOLCHAINS_linux="gcc clang"
4632VALID_TOOLCHAINS_solaris="solstudio"
4633VALID_TOOLCHAINS_macosx="gcc clang"
4634VALID_TOOLCHAINS_aix="xlc"
4635VALID_TOOLCHAINS_windows="microsoft"
4636
4637# Toolchain descriptions
4638TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4639TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4640TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4641TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4642TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4643
4644# Setup a number of variables describing how native output files are
4645# named on this platform/toolchain.
4646
4647
4648# Determine which toolchain type to use, and make sure it is valid for this
4649# platform. Setup various information about the selected toolchain.
4650
4651
4652# Before we start detecting the toolchain executables, we might need some
4653# special setup, e.g. additional paths etc.
4654
4655
4656# Restore path, etc
4657
4658
4659# Check if a compiler is of the toolchain type we expect, and save the version
4660# information from it. If the compiler does not match the expected type,
4661# this function will abort using AC_MSG_ERROR. If it matches, the version will
4662# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4663# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4664#
4665# $1 = compiler to test (CC or CXX)
4666# $2 = human readable name of compiler (C or C++)
4667
4668
4669# Try to locate the given C or C++ compiler in the path, or otherwise.
4670#
4671# $1 = compiler to test (CC or CXX)
4672# $2 = human readable name of compiler (C or C++)
4673# $3 = list of compiler names to search for
4674
4675
4676# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4677# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4678# archiver (AR). Verify that the compilers are correct according to the
4679# toolchain type.
4680
4681
4682# Setup additional tools that is considered a part of the toolchain, but not the
4683# core part. Many of these are highly platform-specific and do not exist,
4684# and/or are not needed on all platforms.
4685
4686
4687# Setup the build tools (i.e, the compiler and linker used to build programs
4688# that should be run on the build platform, not the target platform, as a build
4689# helper). Since the non-cross-compile case uses the normal, target compilers
4690# for this, we can only do this after these have been setup.
4691
4692
4693# Setup legacy variables that are still needed as alternative ways to refer to
4694# parts of the toolchain.
4695
4696
4697# Do some additional checks on the detected tools.
4698
4699
4700# Setup the JTReg Regression Test Harness.
4701
4702
4703#
4704# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4705# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4706#
4707# This code is free software; you can redistribute it and/or modify it
4708# under the terms of the GNU General Public License version 2 only, as
4709# published by the Free Software Foundation.  Oracle designates this
4710# particular file as subject to the "Classpath" exception as provided
4711# by Oracle in the LICENSE file that accompanied this code.
4712#
4713# This code is distributed in the hope that it will be useful, but WITHOUT
4714# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4715# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4716# version 2 for more details (a copy is included in the LICENSE file that
4717# accompanied this code).
4718#
4719# You should have received a copy of the GNU General Public License version
4720# 2 along with this work; if not, write to the Free Software Foundation,
4721# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4722#
4723# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4724# or visit www.oracle.com if you need additional information or have any
4725# questions.
4726#
4727
4728################################################################################
4729# The order of these defines the priority by which we try to find them.
4730VALID_VS_VERSIONS="2013 2012 2010"
4731
4732VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4733VS_VERSION_INTERNAL_2010=100
4734VS_MSVCR_2010=msvcr100.dll
4735# We don't use msvcp on Visual Studio 2010
4736#VS_MSVCP_2010=msvcp100.dll
4737VS_ENVVAR_2010="VS100COMNTOOLS"
4738VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4739VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4740VS_VS_PLATFORM_NAME_2010="v100"
4741VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4742
4743VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4744VS_VERSION_INTERNAL_2012=110
4745VS_MSVCR_2012=msvcr110.dll
4746VS_MSVCP_2012=msvcp110.dll
4747VS_ENVVAR_2012="VS110COMNTOOLS"
4748VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4749VS_SDK_INSTALLDIR_2012=
4750VS_VS_PLATFORM_NAME_2012="v110"
4751VS_SDK_PLATFORM_NAME_2012=
4752
4753VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4754VS_VERSION_INTERNAL_2013=120
4755VS_MSVCR_2013=msvcr120.dll
4756VS_MSVCP_2013=msvcp120.dll
4757VS_ENVVAR_2013="VS120COMNTOOLS"
4758VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4759VS_SDK_INSTALLDIR_2013=
4760VS_VS_PLATFORM_NAME_2013="v120"
4761VS_SDK_PLATFORM_NAME_2013=
4762
4763################################################################################
4764
4765
4766
4767################################################################################
4768
4769
4770
4771################################################################################
4772# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4773# build environment and assigns it to VS_ENV_CMD
4774
4775
4776################################################################################
4777
4778
4779
4780################################################################################
4781# Check if the VS env variables were setup prior to running configure.
4782# If not, then find vcvarsall.bat and run it automatically, and integrate
4783# the set env variables into the spec file.
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798# This line needs to be here, verbatim, after all includes and the dummy hook
4799# definitions. It is replaced with custom functionality when building
4800# custom sources.
4801#CUSTOM_AUTOCONF_INCLUDE
4802
4803# Do not change or remove the following line, it is needed for consistency checks:
4804DATE_WHEN_GENERATED=1452242585
4805
4806###############################################################################
4807#
4808# Initialization / Boot-strapping
4809#
4810# The bootstrapping process needs to solve the "chicken or the egg" problem,
4811# thus it jumps back and forth, each time gaining something needed later on.
4812#
4813###############################################################################
4814
4815# If we are requested to print additional help, do that and then exit.
4816# This must be the very first call.
4817
4818  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4819    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4820    $PRINTF "Which are valid to use depends on the build platform.\n"
4821    for toolchain in $VALID_TOOLCHAINS_all; do
4822      # Use indirect variable referencing
4823      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4824      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4825      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4826    done
4827
4828    # And now exit directly
4829    exit 0
4830  fi
4831
4832
4833# Basic initialization that must happen first of all in the normal process.
4834
4835  # Save the original command line. This is passed to us by the wrapper configure script.
4836
4837  # Save the path variable before it gets changed
4838  ORIGINAL_PATH="$PATH"
4839
4840  DATE_WHEN_CONFIGURED=`LANG=C date`
4841
4842  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4843$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4844  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4845$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4846
4847
4848  # Start with tools that do not need have cross compilation support
4849  # and can be expected to be found in the default PATH. These tools are
4850  # used by configure.
4851
4852  # First are all the simple required tools.
4853
4854
4855
4856  # Publish this variable in the help.
4857
4858
4859  if [ -z "${BASENAME+x}" ]; then
4860    # The variable is not set by user, try to locate tool using the code snippet
4861    for ac_prog in basename
4862do
4863  # Extract the first word of "$ac_prog", so it can be a program name with args.
4864set dummy $ac_prog; ac_word=$2
4865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4866$as_echo_n "checking for $ac_word... " >&6; }
4867if ${ac_cv_path_BASENAME+:} false; then :
4868  $as_echo_n "(cached) " >&6
4869else
4870  case $BASENAME in
4871  [\\/]* | ?:[\\/]*)
4872  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4873  ;;
4874  *)
4875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4876for as_dir in $PATH
4877do
4878  IFS=$as_save_IFS
4879  test -z "$as_dir" && as_dir=.
4880    for ac_exec_ext in '' $ac_executable_extensions; do
4881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4882    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4884    break 2
4885  fi
4886done
4887  done
4888IFS=$as_save_IFS
4889
4890  ;;
4891esac
4892fi
4893BASENAME=$ac_cv_path_BASENAME
4894if test -n "$BASENAME"; then
4895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4896$as_echo "$BASENAME" >&6; }
4897else
4898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4899$as_echo "no" >&6; }
4900fi
4901
4902
4903  test -n "$BASENAME" && break
4904done
4905
4906  else
4907    # The variable is set, but is it from the command line or the environment?
4908
4909    # Try to remove the string !BASENAME! from our list.
4910    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4911    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4912      # If it failed, the variable was not from the command line. Ignore it,
4913      # but warn the user (except for BASH, which is always set by the calling BASH).
4914      if test "xBASENAME" != xBASH; then
4915        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4916$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4917      fi
4918      # Try to locate tool using the code snippet
4919      for ac_prog in basename
4920do
4921  # Extract the first word of "$ac_prog", so it can be a program name with args.
4922set dummy $ac_prog; ac_word=$2
4923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4924$as_echo_n "checking for $ac_word... " >&6; }
4925if ${ac_cv_path_BASENAME+:} false; then :
4926  $as_echo_n "(cached) " >&6
4927else
4928  case $BASENAME in
4929  [\\/]* | ?:[\\/]*)
4930  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4931  ;;
4932  *)
4933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4934for as_dir in $PATH
4935do
4936  IFS=$as_save_IFS
4937  test -z "$as_dir" && as_dir=.
4938    for ac_exec_ext in '' $ac_executable_extensions; do
4939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4940    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4942    break 2
4943  fi
4944done
4945  done
4946IFS=$as_save_IFS
4947
4948  ;;
4949esac
4950fi
4951BASENAME=$ac_cv_path_BASENAME
4952if test -n "$BASENAME"; then
4953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4954$as_echo "$BASENAME" >&6; }
4955else
4956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4957$as_echo "no" >&6; }
4958fi
4959
4960
4961  test -n "$BASENAME" && break
4962done
4963
4964    else
4965      # If it succeeded, then it was overridden by the user. We will use it
4966      # for the tool.
4967
4968      # First remove it from the list of overridden variables, so we can test
4969      # for unknown variables in the end.
4970      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4971
4972      # Check if we try to supply an empty value
4973      if test "x$BASENAME" = x; then
4974        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4975$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4976        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4977$as_echo_n "checking for BASENAME... " >&6; }
4978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4979$as_echo "disabled" >&6; }
4980      else
4981        # Check if the provided tool contains a complete path.
4982        tool_specified="$BASENAME"
4983        tool_basename="${tool_specified##*/}"
4984        if test "x$tool_basename" = "x$tool_specified"; then
4985          # A command without a complete path is provided, search $PATH.
4986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4987$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4988          # Extract the first word of "$tool_basename", so it can be a program name with args.
4989set dummy $tool_basename; ac_word=$2
4990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4991$as_echo_n "checking for $ac_word... " >&6; }
4992if ${ac_cv_path_BASENAME+:} false; then :
4993  $as_echo_n "(cached) " >&6
4994else
4995  case $BASENAME in
4996  [\\/]* | ?:[\\/]*)
4997  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4998  ;;
4999  *)
5000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5001for as_dir in $PATH
5002do
5003  IFS=$as_save_IFS
5004  test -z "$as_dir" && as_dir=.
5005    for ac_exec_ext in '' $ac_executable_extensions; do
5006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5007    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5009    break 2
5010  fi
5011done
5012  done
5013IFS=$as_save_IFS
5014
5015  ;;
5016esac
5017fi
5018BASENAME=$ac_cv_path_BASENAME
5019if test -n "$BASENAME"; then
5020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5021$as_echo "$BASENAME" >&6; }
5022else
5023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5024$as_echo "no" >&6; }
5025fi
5026
5027
5028          if test "x$BASENAME" = x; then
5029            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5030          fi
5031        else
5032          # Otherwise we believe it is a complete path. Use it as it is.
5033          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5034$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5035          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5036$as_echo_n "checking for BASENAME... " >&6; }
5037          if test ! -x "$tool_specified"; then
5038            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5039$as_echo "not found" >&6; }
5040            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5041          fi
5042          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5043$as_echo "$tool_specified" >&6; }
5044        fi
5045      fi
5046    fi
5047
5048  fi
5049
5050
5051
5052  if test "x$BASENAME" = x; then
5053    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5054  fi
5055
5056
5057
5058
5059
5060  # Publish this variable in the help.
5061
5062
5063  if [ -z "${BASH+x}" ]; then
5064    # The variable is not set by user, try to locate tool using the code snippet
5065    for ac_prog in bash
5066do
5067  # Extract the first word of "$ac_prog", so it can be a program name with args.
5068set dummy $ac_prog; ac_word=$2
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070$as_echo_n "checking for $ac_word... " >&6; }
5071if ${ac_cv_path_BASH+:} false; then :
5072  $as_echo_n "(cached) " >&6
5073else
5074  case $BASH in
5075  [\\/]* | ?:[\\/]*)
5076  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5077  ;;
5078  *)
5079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5080for as_dir in $PATH
5081do
5082  IFS=$as_save_IFS
5083  test -z "$as_dir" && as_dir=.
5084    for ac_exec_ext in '' $ac_executable_extensions; do
5085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5086    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5088    break 2
5089  fi
5090done
5091  done
5092IFS=$as_save_IFS
5093
5094  ;;
5095esac
5096fi
5097BASH=$ac_cv_path_BASH
5098if test -n "$BASH"; then
5099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5100$as_echo "$BASH" >&6; }
5101else
5102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5103$as_echo "no" >&6; }
5104fi
5105
5106
5107  test -n "$BASH" && break
5108done
5109
5110  else
5111    # The variable is set, but is it from the command line or the environment?
5112
5113    # Try to remove the string !BASH! from our list.
5114    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5115    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5116      # If it failed, the variable was not from the command line. Ignore it,
5117      # but warn the user (except for BASH, which is always set by the calling BASH).
5118      if test "xBASH" != xBASH; then
5119        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5120$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5121      fi
5122      # Try to locate tool using the code snippet
5123      for ac_prog in bash
5124do
5125  # Extract the first word of "$ac_prog", so it can be a program name with args.
5126set dummy $ac_prog; ac_word=$2
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5128$as_echo_n "checking for $ac_word... " >&6; }
5129if ${ac_cv_path_BASH+:} false; then :
5130  $as_echo_n "(cached) " >&6
5131else
5132  case $BASH in
5133  [\\/]* | ?:[\\/]*)
5134  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5135  ;;
5136  *)
5137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5138for as_dir in $PATH
5139do
5140  IFS=$as_save_IFS
5141  test -z "$as_dir" && as_dir=.
5142    for ac_exec_ext in '' $ac_executable_extensions; do
5143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5144    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5146    break 2
5147  fi
5148done
5149  done
5150IFS=$as_save_IFS
5151
5152  ;;
5153esac
5154fi
5155BASH=$ac_cv_path_BASH
5156if test -n "$BASH"; then
5157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5158$as_echo "$BASH" >&6; }
5159else
5160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5161$as_echo "no" >&6; }
5162fi
5163
5164
5165  test -n "$BASH" && break
5166done
5167
5168    else
5169      # If it succeeded, then it was overridden by the user. We will use it
5170      # for the tool.
5171
5172      # First remove it from the list of overridden variables, so we can test
5173      # for unknown variables in the end.
5174      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5175
5176      # Check if we try to supply an empty value
5177      if test "x$BASH" = x; then
5178        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5179$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5180        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5181$as_echo_n "checking for BASH... " >&6; }
5182        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5183$as_echo "disabled" >&6; }
5184      else
5185        # Check if the provided tool contains a complete path.
5186        tool_specified="$BASH"
5187        tool_basename="${tool_specified##*/}"
5188        if test "x$tool_basename" = "x$tool_specified"; then
5189          # A command without a complete path is provided, search $PATH.
5190          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5191$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5192          # Extract the first word of "$tool_basename", so it can be a program name with args.
5193set dummy $tool_basename; ac_word=$2
5194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5195$as_echo_n "checking for $ac_word... " >&6; }
5196if ${ac_cv_path_BASH+:} false; then :
5197  $as_echo_n "(cached) " >&6
5198else
5199  case $BASH in
5200  [\\/]* | ?:[\\/]*)
5201  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5202  ;;
5203  *)
5204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5205for as_dir in $PATH
5206do
5207  IFS=$as_save_IFS
5208  test -z "$as_dir" && as_dir=.
5209    for ac_exec_ext in '' $ac_executable_extensions; do
5210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5211    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5213    break 2
5214  fi
5215done
5216  done
5217IFS=$as_save_IFS
5218
5219  ;;
5220esac
5221fi
5222BASH=$ac_cv_path_BASH
5223if test -n "$BASH"; then
5224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5225$as_echo "$BASH" >&6; }
5226else
5227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5228$as_echo "no" >&6; }
5229fi
5230
5231
5232          if test "x$BASH" = x; then
5233            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5234          fi
5235        else
5236          # Otherwise we believe it is a complete path. Use it as it is.
5237          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5238$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5239          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5240$as_echo_n "checking for BASH... " >&6; }
5241          if test ! -x "$tool_specified"; then
5242            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5243$as_echo "not found" >&6; }
5244            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5245          fi
5246          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5247$as_echo "$tool_specified" >&6; }
5248        fi
5249      fi
5250    fi
5251
5252  fi
5253
5254
5255
5256  if test "x$BASH" = x; then
5257    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5258  fi
5259
5260
5261
5262
5263
5264  # Publish this variable in the help.
5265
5266
5267  if [ -z "${CAT+x}" ]; then
5268    # The variable is not set by user, try to locate tool using the code snippet
5269    for ac_prog in cat
5270do
5271  # Extract the first word of "$ac_prog", so it can be a program name with args.
5272set dummy $ac_prog; ac_word=$2
5273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5274$as_echo_n "checking for $ac_word... " >&6; }
5275if ${ac_cv_path_CAT+:} false; then :
5276  $as_echo_n "(cached) " >&6
5277else
5278  case $CAT in
5279  [\\/]* | ?:[\\/]*)
5280  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5281  ;;
5282  *)
5283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5284for as_dir in $PATH
5285do
5286  IFS=$as_save_IFS
5287  test -z "$as_dir" && as_dir=.
5288    for ac_exec_ext in '' $ac_executable_extensions; do
5289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5290    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5292    break 2
5293  fi
5294done
5295  done
5296IFS=$as_save_IFS
5297
5298  ;;
5299esac
5300fi
5301CAT=$ac_cv_path_CAT
5302if test -n "$CAT"; then
5303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5304$as_echo "$CAT" >&6; }
5305else
5306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5307$as_echo "no" >&6; }
5308fi
5309
5310
5311  test -n "$CAT" && break
5312done
5313
5314  else
5315    # The variable is set, but is it from the command line or the environment?
5316
5317    # Try to remove the string !CAT! from our list.
5318    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5319    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5320      # If it failed, the variable was not from the command line. Ignore it,
5321      # but warn the user (except for BASH, which is always set by the calling BASH).
5322      if test "xCAT" != xBASH; then
5323        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5324$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5325      fi
5326      # Try to locate tool using the code snippet
5327      for ac_prog in cat
5328do
5329  # Extract the first word of "$ac_prog", so it can be a program name with args.
5330set dummy $ac_prog; ac_word=$2
5331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5332$as_echo_n "checking for $ac_word... " >&6; }
5333if ${ac_cv_path_CAT+:} false; then :
5334  $as_echo_n "(cached) " >&6
5335else
5336  case $CAT in
5337  [\\/]* | ?:[\\/]*)
5338  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5339  ;;
5340  *)
5341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5342for as_dir in $PATH
5343do
5344  IFS=$as_save_IFS
5345  test -z "$as_dir" && as_dir=.
5346    for ac_exec_ext in '' $ac_executable_extensions; do
5347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5348    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5350    break 2
5351  fi
5352done
5353  done
5354IFS=$as_save_IFS
5355
5356  ;;
5357esac
5358fi
5359CAT=$ac_cv_path_CAT
5360if test -n "$CAT"; then
5361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5362$as_echo "$CAT" >&6; }
5363else
5364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5365$as_echo "no" >&6; }
5366fi
5367
5368
5369  test -n "$CAT" && break
5370done
5371
5372    else
5373      # If it succeeded, then it was overridden by the user. We will use it
5374      # for the tool.
5375
5376      # First remove it from the list of overridden variables, so we can test
5377      # for unknown variables in the end.
5378      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5379
5380      # Check if we try to supply an empty value
5381      if test "x$CAT" = x; then
5382        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5383$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5384        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5385$as_echo_n "checking for CAT... " >&6; }
5386        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5387$as_echo "disabled" >&6; }
5388      else
5389        # Check if the provided tool contains a complete path.
5390        tool_specified="$CAT"
5391        tool_basename="${tool_specified##*/}"
5392        if test "x$tool_basename" = "x$tool_specified"; then
5393          # A command without a complete path is provided, search $PATH.
5394          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5395$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5396          # Extract the first word of "$tool_basename", so it can be a program name with args.
5397set dummy $tool_basename; ac_word=$2
5398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5399$as_echo_n "checking for $ac_word... " >&6; }
5400if ${ac_cv_path_CAT+:} false; then :
5401  $as_echo_n "(cached) " >&6
5402else
5403  case $CAT in
5404  [\\/]* | ?:[\\/]*)
5405  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5406  ;;
5407  *)
5408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5409for as_dir in $PATH
5410do
5411  IFS=$as_save_IFS
5412  test -z "$as_dir" && as_dir=.
5413    for ac_exec_ext in '' $ac_executable_extensions; do
5414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5415    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5417    break 2
5418  fi
5419done
5420  done
5421IFS=$as_save_IFS
5422
5423  ;;
5424esac
5425fi
5426CAT=$ac_cv_path_CAT
5427if test -n "$CAT"; then
5428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5429$as_echo "$CAT" >&6; }
5430else
5431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5432$as_echo "no" >&6; }
5433fi
5434
5435
5436          if test "x$CAT" = x; then
5437            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5438          fi
5439        else
5440          # Otherwise we believe it is a complete path. Use it as it is.
5441          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5442$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5443          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5444$as_echo_n "checking for CAT... " >&6; }
5445          if test ! -x "$tool_specified"; then
5446            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5447$as_echo "not found" >&6; }
5448            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5449          fi
5450          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5451$as_echo "$tool_specified" >&6; }
5452        fi
5453      fi
5454    fi
5455
5456  fi
5457
5458
5459
5460  if test "x$CAT" = x; then
5461    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5462  fi
5463
5464
5465
5466
5467
5468  # Publish this variable in the help.
5469
5470
5471  if [ -z "${CHMOD+x}" ]; then
5472    # The variable is not set by user, try to locate tool using the code snippet
5473    for ac_prog in chmod
5474do
5475  # Extract the first word of "$ac_prog", so it can be a program name with args.
5476set dummy $ac_prog; ac_word=$2
5477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5478$as_echo_n "checking for $ac_word... " >&6; }
5479if ${ac_cv_path_CHMOD+:} false; then :
5480  $as_echo_n "(cached) " >&6
5481else
5482  case $CHMOD in
5483  [\\/]* | ?:[\\/]*)
5484  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5485  ;;
5486  *)
5487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5488for as_dir in $PATH
5489do
5490  IFS=$as_save_IFS
5491  test -z "$as_dir" && as_dir=.
5492    for ac_exec_ext in '' $ac_executable_extensions; do
5493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5494    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5496    break 2
5497  fi
5498done
5499  done
5500IFS=$as_save_IFS
5501
5502  ;;
5503esac
5504fi
5505CHMOD=$ac_cv_path_CHMOD
5506if test -n "$CHMOD"; then
5507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5508$as_echo "$CHMOD" >&6; }
5509else
5510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5511$as_echo "no" >&6; }
5512fi
5513
5514
5515  test -n "$CHMOD" && break
5516done
5517
5518  else
5519    # The variable is set, but is it from the command line or the environment?
5520
5521    # Try to remove the string !CHMOD! from our list.
5522    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5523    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5524      # If it failed, the variable was not from the command line. Ignore it,
5525      # but warn the user (except for BASH, which is always set by the calling BASH).
5526      if test "xCHMOD" != xBASH; then
5527        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5528$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5529      fi
5530      # Try to locate tool using the code snippet
5531      for ac_prog in chmod
5532do
5533  # Extract the first word of "$ac_prog", so it can be a program name with args.
5534set dummy $ac_prog; ac_word=$2
5535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5536$as_echo_n "checking for $ac_word... " >&6; }
5537if ${ac_cv_path_CHMOD+:} false; then :
5538  $as_echo_n "(cached) " >&6
5539else
5540  case $CHMOD in
5541  [\\/]* | ?:[\\/]*)
5542  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5543  ;;
5544  *)
5545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5546for as_dir in $PATH
5547do
5548  IFS=$as_save_IFS
5549  test -z "$as_dir" && as_dir=.
5550    for ac_exec_ext in '' $ac_executable_extensions; do
5551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5552    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5554    break 2
5555  fi
5556done
5557  done
5558IFS=$as_save_IFS
5559
5560  ;;
5561esac
5562fi
5563CHMOD=$ac_cv_path_CHMOD
5564if test -n "$CHMOD"; then
5565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5566$as_echo "$CHMOD" >&6; }
5567else
5568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5569$as_echo "no" >&6; }
5570fi
5571
5572
5573  test -n "$CHMOD" && break
5574done
5575
5576    else
5577      # If it succeeded, then it was overridden by the user. We will use it
5578      # for the tool.
5579
5580      # First remove it from the list of overridden variables, so we can test
5581      # for unknown variables in the end.
5582      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5583
5584      # Check if we try to supply an empty value
5585      if test "x$CHMOD" = x; then
5586        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5587$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5588        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5589$as_echo_n "checking for CHMOD... " >&6; }
5590        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5591$as_echo "disabled" >&6; }
5592      else
5593        # Check if the provided tool contains a complete path.
5594        tool_specified="$CHMOD"
5595        tool_basename="${tool_specified##*/}"
5596        if test "x$tool_basename" = "x$tool_specified"; then
5597          # A command without a complete path is provided, search $PATH.
5598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5599$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5600          # Extract the first word of "$tool_basename", so it can be a program name with args.
5601set dummy $tool_basename; ac_word=$2
5602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5603$as_echo_n "checking for $ac_word... " >&6; }
5604if ${ac_cv_path_CHMOD+:} false; then :
5605  $as_echo_n "(cached) " >&6
5606else
5607  case $CHMOD in
5608  [\\/]* | ?:[\\/]*)
5609  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5610  ;;
5611  *)
5612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5613for as_dir in $PATH
5614do
5615  IFS=$as_save_IFS
5616  test -z "$as_dir" && as_dir=.
5617    for ac_exec_ext in '' $ac_executable_extensions; do
5618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5619    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5621    break 2
5622  fi
5623done
5624  done
5625IFS=$as_save_IFS
5626
5627  ;;
5628esac
5629fi
5630CHMOD=$ac_cv_path_CHMOD
5631if test -n "$CHMOD"; then
5632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5633$as_echo "$CHMOD" >&6; }
5634else
5635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5636$as_echo "no" >&6; }
5637fi
5638
5639
5640          if test "x$CHMOD" = x; then
5641            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5642          fi
5643        else
5644          # Otherwise we believe it is a complete path. Use it as it is.
5645          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5646$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5647          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5648$as_echo_n "checking for CHMOD... " >&6; }
5649          if test ! -x "$tool_specified"; then
5650            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5651$as_echo "not found" >&6; }
5652            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5653          fi
5654          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5655$as_echo "$tool_specified" >&6; }
5656        fi
5657      fi
5658    fi
5659
5660  fi
5661
5662
5663
5664  if test "x$CHMOD" = x; then
5665    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5666  fi
5667
5668
5669
5670
5671
5672  # Publish this variable in the help.
5673
5674
5675  if [ -z "${CMP+x}" ]; then
5676    # The variable is not set by user, try to locate tool using the code snippet
5677    for ac_prog in cmp
5678do
5679  # Extract the first word of "$ac_prog", so it can be a program name with args.
5680set dummy $ac_prog; ac_word=$2
5681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5682$as_echo_n "checking for $ac_word... " >&6; }
5683if ${ac_cv_path_CMP+:} false; then :
5684  $as_echo_n "(cached) " >&6
5685else
5686  case $CMP in
5687  [\\/]* | ?:[\\/]*)
5688  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5689  ;;
5690  *)
5691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5692for as_dir in $PATH
5693do
5694  IFS=$as_save_IFS
5695  test -z "$as_dir" && as_dir=.
5696    for ac_exec_ext in '' $ac_executable_extensions; do
5697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5698    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5700    break 2
5701  fi
5702done
5703  done
5704IFS=$as_save_IFS
5705
5706  ;;
5707esac
5708fi
5709CMP=$ac_cv_path_CMP
5710if test -n "$CMP"; then
5711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5712$as_echo "$CMP" >&6; }
5713else
5714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5715$as_echo "no" >&6; }
5716fi
5717
5718
5719  test -n "$CMP" && break
5720done
5721
5722  else
5723    # The variable is set, but is it from the command line or the environment?
5724
5725    # Try to remove the string !CMP! from our list.
5726    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5727    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5728      # If it failed, the variable was not from the command line. Ignore it,
5729      # but warn the user (except for BASH, which is always set by the calling BASH).
5730      if test "xCMP" != xBASH; then
5731        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5732$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5733      fi
5734      # Try to locate tool using the code snippet
5735      for ac_prog in cmp
5736do
5737  # Extract the first word of "$ac_prog", so it can be a program name with args.
5738set dummy $ac_prog; ac_word=$2
5739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5740$as_echo_n "checking for $ac_word... " >&6; }
5741if ${ac_cv_path_CMP+:} false; then :
5742  $as_echo_n "(cached) " >&6
5743else
5744  case $CMP in
5745  [\\/]* | ?:[\\/]*)
5746  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5747  ;;
5748  *)
5749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5750for as_dir in $PATH
5751do
5752  IFS=$as_save_IFS
5753  test -z "$as_dir" && as_dir=.
5754    for ac_exec_ext in '' $ac_executable_extensions; do
5755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5756    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5758    break 2
5759  fi
5760done
5761  done
5762IFS=$as_save_IFS
5763
5764  ;;
5765esac
5766fi
5767CMP=$ac_cv_path_CMP
5768if test -n "$CMP"; then
5769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5770$as_echo "$CMP" >&6; }
5771else
5772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5773$as_echo "no" >&6; }
5774fi
5775
5776
5777  test -n "$CMP" && break
5778done
5779
5780    else
5781      # If it succeeded, then it was overridden by the user. We will use it
5782      # for the tool.
5783
5784      # First remove it from the list of overridden variables, so we can test
5785      # for unknown variables in the end.
5786      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5787
5788      # Check if we try to supply an empty value
5789      if test "x$CMP" = x; then
5790        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5791$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5792        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5793$as_echo_n "checking for CMP... " >&6; }
5794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5795$as_echo "disabled" >&6; }
5796      else
5797        # Check if the provided tool contains a complete path.
5798        tool_specified="$CMP"
5799        tool_basename="${tool_specified##*/}"
5800        if test "x$tool_basename" = "x$tool_specified"; then
5801          # A command without a complete path is provided, search $PATH.
5802          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5803$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5804          # Extract the first word of "$tool_basename", so it can be a program name with args.
5805set dummy $tool_basename; ac_word=$2
5806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5807$as_echo_n "checking for $ac_word... " >&6; }
5808if ${ac_cv_path_CMP+:} false; then :
5809  $as_echo_n "(cached) " >&6
5810else
5811  case $CMP in
5812  [\\/]* | ?:[\\/]*)
5813  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5814  ;;
5815  *)
5816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5817for as_dir in $PATH
5818do
5819  IFS=$as_save_IFS
5820  test -z "$as_dir" && as_dir=.
5821    for ac_exec_ext in '' $ac_executable_extensions; do
5822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5823    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5825    break 2
5826  fi
5827done
5828  done
5829IFS=$as_save_IFS
5830
5831  ;;
5832esac
5833fi
5834CMP=$ac_cv_path_CMP
5835if test -n "$CMP"; then
5836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5837$as_echo "$CMP" >&6; }
5838else
5839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5840$as_echo "no" >&6; }
5841fi
5842
5843
5844          if test "x$CMP" = x; then
5845            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5846          fi
5847        else
5848          # Otherwise we believe it is a complete path. Use it as it is.
5849          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5850$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5851          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5852$as_echo_n "checking for CMP... " >&6; }
5853          if test ! -x "$tool_specified"; then
5854            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5855$as_echo "not found" >&6; }
5856            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5857          fi
5858          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5859$as_echo "$tool_specified" >&6; }
5860        fi
5861      fi
5862    fi
5863
5864  fi
5865
5866
5867
5868  if test "x$CMP" = x; then
5869    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5870  fi
5871
5872
5873
5874
5875
5876  # Publish this variable in the help.
5877
5878
5879  if [ -z "${COMM+x}" ]; then
5880    # The variable is not set by user, try to locate tool using the code snippet
5881    for ac_prog in comm
5882do
5883  # Extract the first word of "$ac_prog", so it can be a program name with args.
5884set dummy $ac_prog; ac_word=$2
5885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5886$as_echo_n "checking for $ac_word... " >&6; }
5887if ${ac_cv_path_COMM+:} false; then :
5888  $as_echo_n "(cached) " >&6
5889else
5890  case $COMM in
5891  [\\/]* | ?:[\\/]*)
5892  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5893  ;;
5894  *)
5895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5896for as_dir in $PATH
5897do
5898  IFS=$as_save_IFS
5899  test -z "$as_dir" && as_dir=.
5900    for ac_exec_ext in '' $ac_executable_extensions; do
5901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5902    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5904    break 2
5905  fi
5906done
5907  done
5908IFS=$as_save_IFS
5909
5910  ;;
5911esac
5912fi
5913COMM=$ac_cv_path_COMM
5914if test -n "$COMM"; then
5915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5916$as_echo "$COMM" >&6; }
5917else
5918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5919$as_echo "no" >&6; }
5920fi
5921
5922
5923  test -n "$COMM" && break
5924done
5925
5926  else
5927    # The variable is set, but is it from the command line or the environment?
5928
5929    # Try to remove the string !COMM! from our list.
5930    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5931    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5932      # If it failed, the variable was not from the command line. Ignore it,
5933      # but warn the user (except for BASH, which is always set by the calling BASH).
5934      if test "xCOMM" != xBASH; then
5935        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5936$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5937      fi
5938      # Try to locate tool using the code snippet
5939      for ac_prog in comm
5940do
5941  # Extract the first word of "$ac_prog", so it can be a program name with args.
5942set dummy $ac_prog; ac_word=$2
5943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5944$as_echo_n "checking for $ac_word... " >&6; }
5945if ${ac_cv_path_COMM+:} false; then :
5946  $as_echo_n "(cached) " >&6
5947else
5948  case $COMM in
5949  [\\/]* | ?:[\\/]*)
5950  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5951  ;;
5952  *)
5953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5954for as_dir in $PATH
5955do
5956  IFS=$as_save_IFS
5957  test -z "$as_dir" && as_dir=.
5958    for ac_exec_ext in '' $ac_executable_extensions; do
5959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5960    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5962    break 2
5963  fi
5964done
5965  done
5966IFS=$as_save_IFS
5967
5968  ;;
5969esac
5970fi
5971COMM=$ac_cv_path_COMM
5972if test -n "$COMM"; then
5973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5974$as_echo "$COMM" >&6; }
5975else
5976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5977$as_echo "no" >&6; }
5978fi
5979
5980
5981  test -n "$COMM" && break
5982done
5983
5984    else
5985      # If it succeeded, then it was overridden by the user. We will use it
5986      # for the tool.
5987
5988      # First remove it from the list of overridden variables, so we can test
5989      # for unknown variables in the end.
5990      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5991
5992      # Check if we try to supply an empty value
5993      if test "x$COMM" = x; then
5994        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5995$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5996        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5997$as_echo_n "checking for COMM... " >&6; }
5998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5999$as_echo "disabled" >&6; }
6000      else
6001        # Check if the provided tool contains a complete path.
6002        tool_specified="$COMM"
6003        tool_basename="${tool_specified##*/}"
6004        if test "x$tool_basename" = "x$tool_specified"; then
6005          # A command without a complete path is provided, search $PATH.
6006          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6007$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6008          # Extract the first word of "$tool_basename", so it can be a program name with args.
6009set dummy $tool_basename; ac_word=$2
6010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6011$as_echo_n "checking for $ac_word... " >&6; }
6012if ${ac_cv_path_COMM+:} false; then :
6013  $as_echo_n "(cached) " >&6
6014else
6015  case $COMM in
6016  [\\/]* | ?:[\\/]*)
6017  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6018  ;;
6019  *)
6020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6021for as_dir in $PATH
6022do
6023  IFS=$as_save_IFS
6024  test -z "$as_dir" && as_dir=.
6025    for ac_exec_ext in '' $ac_executable_extensions; do
6026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6027    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6029    break 2
6030  fi
6031done
6032  done
6033IFS=$as_save_IFS
6034
6035  ;;
6036esac
6037fi
6038COMM=$ac_cv_path_COMM
6039if test -n "$COMM"; then
6040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6041$as_echo "$COMM" >&6; }
6042else
6043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6044$as_echo "no" >&6; }
6045fi
6046
6047
6048          if test "x$COMM" = x; then
6049            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6050          fi
6051        else
6052          # Otherwise we believe it is a complete path. Use it as it is.
6053          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6054$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6055          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6056$as_echo_n "checking for COMM... " >&6; }
6057          if test ! -x "$tool_specified"; then
6058            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6059$as_echo "not found" >&6; }
6060            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6061          fi
6062          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6063$as_echo "$tool_specified" >&6; }
6064        fi
6065      fi
6066    fi
6067
6068  fi
6069
6070
6071
6072  if test "x$COMM" = x; then
6073    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6074  fi
6075
6076
6077
6078
6079
6080  # Publish this variable in the help.
6081
6082
6083  if [ -z "${CP+x}" ]; then
6084    # The variable is not set by user, try to locate tool using the code snippet
6085    for ac_prog in cp
6086do
6087  # Extract the first word of "$ac_prog", so it can be a program name with args.
6088set dummy $ac_prog; ac_word=$2
6089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6090$as_echo_n "checking for $ac_word... " >&6; }
6091if ${ac_cv_path_CP+:} false; then :
6092  $as_echo_n "(cached) " >&6
6093else
6094  case $CP in
6095  [\\/]* | ?:[\\/]*)
6096  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6097  ;;
6098  *)
6099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6100for as_dir in $PATH
6101do
6102  IFS=$as_save_IFS
6103  test -z "$as_dir" && as_dir=.
6104    for ac_exec_ext in '' $ac_executable_extensions; do
6105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6106    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6108    break 2
6109  fi
6110done
6111  done
6112IFS=$as_save_IFS
6113
6114  ;;
6115esac
6116fi
6117CP=$ac_cv_path_CP
6118if test -n "$CP"; then
6119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6120$as_echo "$CP" >&6; }
6121else
6122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6123$as_echo "no" >&6; }
6124fi
6125
6126
6127  test -n "$CP" && break
6128done
6129
6130  else
6131    # The variable is set, but is it from the command line or the environment?
6132
6133    # Try to remove the string !CP! from our list.
6134    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6135    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6136      # If it failed, the variable was not from the command line. Ignore it,
6137      # but warn the user (except for BASH, which is always set by the calling BASH).
6138      if test "xCP" != xBASH; then
6139        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6140$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6141      fi
6142      # Try to locate tool using the code snippet
6143      for ac_prog in cp
6144do
6145  # Extract the first word of "$ac_prog", so it can be a program name with args.
6146set dummy $ac_prog; ac_word=$2
6147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6148$as_echo_n "checking for $ac_word... " >&6; }
6149if ${ac_cv_path_CP+:} false; then :
6150  $as_echo_n "(cached) " >&6
6151else
6152  case $CP in
6153  [\\/]* | ?:[\\/]*)
6154  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6155  ;;
6156  *)
6157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6158for as_dir in $PATH
6159do
6160  IFS=$as_save_IFS
6161  test -z "$as_dir" && as_dir=.
6162    for ac_exec_ext in '' $ac_executable_extensions; do
6163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6164    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6166    break 2
6167  fi
6168done
6169  done
6170IFS=$as_save_IFS
6171
6172  ;;
6173esac
6174fi
6175CP=$ac_cv_path_CP
6176if test -n "$CP"; then
6177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6178$as_echo "$CP" >&6; }
6179else
6180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6181$as_echo "no" >&6; }
6182fi
6183
6184
6185  test -n "$CP" && break
6186done
6187
6188    else
6189      # If it succeeded, then it was overridden by the user. We will use it
6190      # for the tool.
6191
6192      # First remove it from the list of overridden variables, so we can test
6193      # for unknown variables in the end.
6194      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6195
6196      # Check if we try to supply an empty value
6197      if test "x$CP" = x; then
6198        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6199$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6201$as_echo_n "checking for CP... " >&6; }
6202        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6203$as_echo "disabled" >&6; }
6204      else
6205        # Check if the provided tool contains a complete path.
6206        tool_specified="$CP"
6207        tool_basename="${tool_specified##*/}"
6208        if test "x$tool_basename" = "x$tool_specified"; then
6209          # A command without a complete path is provided, search $PATH.
6210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6211$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6212          # Extract the first word of "$tool_basename", so it can be a program name with args.
6213set dummy $tool_basename; ac_word=$2
6214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6215$as_echo_n "checking for $ac_word... " >&6; }
6216if ${ac_cv_path_CP+:} false; then :
6217  $as_echo_n "(cached) " >&6
6218else
6219  case $CP in
6220  [\\/]* | ?:[\\/]*)
6221  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6222  ;;
6223  *)
6224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6225for as_dir in $PATH
6226do
6227  IFS=$as_save_IFS
6228  test -z "$as_dir" && as_dir=.
6229    for ac_exec_ext in '' $ac_executable_extensions; do
6230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6231    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6233    break 2
6234  fi
6235done
6236  done
6237IFS=$as_save_IFS
6238
6239  ;;
6240esac
6241fi
6242CP=$ac_cv_path_CP
6243if test -n "$CP"; then
6244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6245$as_echo "$CP" >&6; }
6246else
6247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6248$as_echo "no" >&6; }
6249fi
6250
6251
6252          if test "x$CP" = x; then
6253            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6254          fi
6255        else
6256          # Otherwise we believe it is a complete path. Use it as it is.
6257          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6258$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6259          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6260$as_echo_n "checking for CP... " >&6; }
6261          if test ! -x "$tool_specified"; then
6262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6263$as_echo "not found" >&6; }
6264            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6265          fi
6266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6267$as_echo "$tool_specified" >&6; }
6268        fi
6269      fi
6270    fi
6271
6272  fi
6273
6274
6275
6276  if test "x$CP" = x; then
6277    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6278  fi
6279
6280
6281
6282
6283
6284  # Publish this variable in the help.
6285
6286
6287  if [ -z "${CUT+x}" ]; then
6288    # The variable is not set by user, try to locate tool using the code snippet
6289    for ac_prog in cut
6290do
6291  # Extract the first word of "$ac_prog", so it can be a program name with args.
6292set dummy $ac_prog; ac_word=$2
6293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6294$as_echo_n "checking for $ac_word... " >&6; }
6295if ${ac_cv_path_CUT+:} false; then :
6296  $as_echo_n "(cached) " >&6
6297else
6298  case $CUT in
6299  [\\/]* | ?:[\\/]*)
6300  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6301  ;;
6302  *)
6303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6304for as_dir in $PATH
6305do
6306  IFS=$as_save_IFS
6307  test -z "$as_dir" && as_dir=.
6308    for ac_exec_ext in '' $ac_executable_extensions; do
6309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6310    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6312    break 2
6313  fi
6314done
6315  done
6316IFS=$as_save_IFS
6317
6318  ;;
6319esac
6320fi
6321CUT=$ac_cv_path_CUT
6322if test -n "$CUT"; then
6323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6324$as_echo "$CUT" >&6; }
6325else
6326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6327$as_echo "no" >&6; }
6328fi
6329
6330
6331  test -n "$CUT" && break
6332done
6333
6334  else
6335    # The variable is set, but is it from the command line or the environment?
6336
6337    # Try to remove the string !CUT! from our list.
6338    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6339    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6340      # If it failed, the variable was not from the command line. Ignore it,
6341      # but warn the user (except for BASH, which is always set by the calling BASH).
6342      if test "xCUT" != xBASH; then
6343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6344$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6345      fi
6346      # Try to locate tool using the code snippet
6347      for ac_prog in cut
6348do
6349  # Extract the first word of "$ac_prog", so it can be a program name with args.
6350set dummy $ac_prog; ac_word=$2
6351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6352$as_echo_n "checking for $ac_word... " >&6; }
6353if ${ac_cv_path_CUT+:} false; then :
6354  $as_echo_n "(cached) " >&6
6355else
6356  case $CUT in
6357  [\\/]* | ?:[\\/]*)
6358  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6359  ;;
6360  *)
6361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6362for as_dir in $PATH
6363do
6364  IFS=$as_save_IFS
6365  test -z "$as_dir" && as_dir=.
6366    for ac_exec_ext in '' $ac_executable_extensions; do
6367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6368    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6370    break 2
6371  fi
6372done
6373  done
6374IFS=$as_save_IFS
6375
6376  ;;
6377esac
6378fi
6379CUT=$ac_cv_path_CUT
6380if test -n "$CUT"; then
6381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6382$as_echo "$CUT" >&6; }
6383else
6384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6385$as_echo "no" >&6; }
6386fi
6387
6388
6389  test -n "$CUT" && break
6390done
6391
6392    else
6393      # If it succeeded, then it was overridden by the user. We will use it
6394      # for the tool.
6395
6396      # First remove it from the list of overridden variables, so we can test
6397      # for unknown variables in the end.
6398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6399
6400      # Check if we try to supply an empty value
6401      if test "x$CUT" = x; then
6402        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6403$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6405$as_echo_n "checking for CUT... " >&6; }
6406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6407$as_echo "disabled" >&6; }
6408      else
6409        # Check if the provided tool contains a complete path.
6410        tool_specified="$CUT"
6411        tool_basename="${tool_specified##*/}"
6412        if test "x$tool_basename" = "x$tool_specified"; then
6413          # A command without a complete path is provided, search $PATH.
6414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6415$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6416          # Extract the first word of "$tool_basename", so it can be a program name with args.
6417set dummy $tool_basename; ac_word=$2
6418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6419$as_echo_n "checking for $ac_word... " >&6; }
6420if ${ac_cv_path_CUT+:} false; then :
6421  $as_echo_n "(cached) " >&6
6422else
6423  case $CUT in
6424  [\\/]* | ?:[\\/]*)
6425  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6426  ;;
6427  *)
6428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6429for as_dir in $PATH
6430do
6431  IFS=$as_save_IFS
6432  test -z "$as_dir" && as_dir=.
6433    for ac_exec_ext in '' $ac_executable_extensions; do
6434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6435    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6437    break 2
6438  fi
6439done
6440  done
6441IFS=$as_save_IFS
6442
6443  ;;
6444esac
6445fi
6446CUT=$ac_cv_path_CUT
6447if test -n "$CUT"; then
6448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6449$as_echo "$CUT" >&6; }
6450else
6451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6452$as_echo "no" >&6; }
6453fi
6454
6455
6456          if test "x$CUT" = x; then
6457            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6458          fi
6459        else
6460          # Otherwise we believe it is a complete path. Use it as it is.
6461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6462$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6463          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6464$as_echo_n "checking for CUT... " >&6; }
6465          if test ! -x "$tool_specified"; then
6466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6467$as_echo "not found" >&6; }
6468            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6469          fi
6470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6471$as_echo "$tool_specified" >&6; }
6472        fi
6473      fi
6474    fi
6475
6476  fi
6477
6478
6479
6480  if test "x$CUT" = x; then
6481    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6482  fi
6483
6484
6485
6486
6487
6488  # Publish this variable in the help.
6489
6490
6491  if [ -z "${DATE+x}" ]; then
6492    # The variable is not set by user, try to locate tool using the code snippet
6493    for ac_prog in date
6494do
6495  # Extract the first word of "$ac_prog", so it can be a program name with args.
6496set dummy $ac_prog; ac_word=$2
6497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6498$as_echo_n "checking for $ac_word... " >&6; }
6499if ${ac_cv_path_DATE+:} false; then :
6500  $as_echo_n "(cached) " >&6
6501else
6502  case $DATE in
6503  [\\/]* | ?:[\\/]*)
6504  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6505  ;;
6506  *)
6507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6508for as_dir in $PATH
6509do
6510  IFS=$as_save_IFS
6511  test -z "$as_dir" && as_dir=.
6512    for ac_exec_ext in '' $ac_executable_extensions; do
6513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6514    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6516    break 2
6517  fi
6518done
6519  done
6520IFS=$as_save_IFS
6521
6522  ;;
6523esac
6524fi
6525DATE=$ac_cv_path_DATE
6526if test -n "$DATE"; then
6527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6528$as_echo "$DATE" >&6; }
6529else
6530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6531$as_echo "no" >&6; }
6532fi
6533
6534
6535  test -n "$DATE" && break
6536done
6537
6538  else
6539    # The variable is set, but is it from the command line or the environment?
6540
6541    # Try to remove the string !DATE! from our list.
6542    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6543    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6544      # If it failed, the variable was not from the command line. Ignore it,
6545      # but warn the user (except for BASH, which is always set by the calling BASH).
6546      if test "xDATE" != xBASH; then
6547        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6548$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6549      fi
6550      # Try to locate tool using the code snippet
6551      for ac_prog in date
6552do
6553  # Extract the first word of "$ac_prog", so it can be a program name with args.
6554set dummy $ac_prog; ac_word=$2
6555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6556$as_echo_n "checking for $ac_word... " >&6; }
6557if ${ac_cv_path_DATE+:} false; then :
6558  $as_echo_n "(cached) " >&6
6559else
6560  case $DATE in
6561  [\\/]* | ?:[\\/]*)
6562  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6563  ;;
6564  *)
6565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6566for as_dir in $PATH
6567do
6568  IFS=$as_save_IFS
6569  test -z "$as_dir" && as_dir=.
6570    for ac_exec_ext in '' $ac_executable_extensions; do
6571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6572    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6574    break 2
6575  fi
6576done
6577  done
6578IFS=$as_save_IFS
6579
6580  ;;
6581esac
6582fi
6583DATE=$ac_cv_path_DATE
6584if test -n "$DATE"; then
6585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6586$as_echo "$DATE" >&6; }
6587else
6588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6589$as_echo "no" >&6; }
6590fi
6591
6592
6593  test -n "$DATE" && break
6594done
6595
6596    else
6597      # If it succeeded, then it was overridden by the user. We will use it
6598      # for the tool.
6599
6600      # First remove it from the list of overridden variables, so we can test
6601      # for unknown variables in the end.
6602      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6603
6604      # Check if we try to supply an empty value
6605      if test "x$DATE" = x; then
6606        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6607$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6609$as_echo_n "checking for DATE... " >&6; }
6610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6611$as_echo "disabled" >&6; }
6612      else
6613        # Check if the provided tool contains a complete path.
6614        tool_specified="$DATE"
6615        tool_basename="${tool_specified##*/}"
6616        if test "x$tool_basename" = "x$tool_specified"; then
6617          # A command without a complete path is provided, search $PATH.
6618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6619$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6620          # Extract the first word of "$tool_basename", so it can be a program name with args.
6621set dummy $tool_basename; ac_word=$2
6622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6623$as_echo_n "checking for $ac_word... " >&6; }
6624if ${ac_cv_path_DATE+:} false; then :
6625  $as_echo_n "(cached) " >&6
6626else
6627  case $DATE in
6628  [\\/]* | ?:[\\/]*)
6629  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6630  ;;
6631  *)
6632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6633for as_dir in $PATH
6634do
6635  IFS=$as_save_IFS
6636  test -z "$as_dir" && as_dir=.
6637    for ac_exec_ext in '' $ac_executable_extensions; do
6638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6639    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6641    break 2
6642  fi
6643done
6644  done
6645IFS=$as_save_IFS
6646
6647  ;;
6648esac
6649fi
6650DATE=$ac_cv_path_DATE
6651if test -n "$DATE"; then
6652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6653$as_echo "$DATE" >&6; }
6654else
6655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6656$as_echo "no" >&6; }
6657fi
6658
6659
6660          if test "x$DATE" = x; then
6661            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6662          fi
6663        else
6664          # Otherwise we believe it is a complete path. Use it as it is.
6665          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6666$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6667          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6668$as_echo_n "checking for DATE... " >&6; }
6669          if test ! -x "$tool_specified"; then
6670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6671$as_echo "not found" >&6; }
6672            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6673          fi
6674          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6675$as_echo "$tool_specified" >&6; }
6676        fi
6677      fi
6678    fi
6679
6680  fi
6681
6682
6683
6684  if test "x$DATE" = x; then
6685    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6686  fi
6687
6688
6689
6690
6691
6692  # Publish this variable in the help.
6693
6694
6695  if [ -z "${DIFF+x}" ]; then
6696    # The variable is not set by user, try to locate tool using the code snippet
6697    for ac_prog in gdiff diff
6698do
6699  # Extract the first word of "$ac_prog", so it can be a program name with args.
6700set dummy $ac_prog; ac_word=$2
6701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6702$as_echo_n "checking for $ac_word... " >&6; }
6703if ${ac_cv_path_DIFF+:} false; then :
6704  $as_echo_n "(cached) " >&6
6705else
6706  case $DIFF in
6707  [\\/]* | ?:[\\/]*)
6708  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6709  ;;
6710  *)
6711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6712for as_dir in $PATH
6713do
6714  IFS=$as_save_IFS
6715  test -z "$as_dir" && as_dir=.
6716    for ac_exec_ext in '' $ac_executable_extensions; do
6717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6718    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6720    break 2
6721  fi
6722done
6723  done
6724IFS=$as_save_IFS
6725
6726  ;;
6727esac
6728fi
6729DIFF=$ac_cv_path_DIFF
6730if test -n "$DIFF"; then
6731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6732$as_echo "$DIFF" >&6; }
6733else
6734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6735$as_echo "no" >&6; }
6736fi
6737
6738
6739  test -n "$DIFF" && break
6740done
6741
6742  else
6743    # The variable is set, but is it from the command line or the environment?
6744
6745    # Try to remove the string !DIFF! from our list.
6746    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6747    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6748      # If it failed, the variable was not from the command line. Ignore it,
6749      # but warn the user (except for BASH, which is always set by the calling BASH).
6750      if test "xDIFF" != xBASH; then
6751        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6752$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6753      fi
6754      # Try to locate tool using the code snippet
6755      for ac_prog in gdiff diff
6756do
6757  # Extract the first word of "$ac_prog", so it can be a program name with args.
6758set dummy $ac_prog; ac_word=$2
6759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6760$as_echo_n "checking for $ac_word... " >&6; }
6761if ${ac_cv_path_DIFF+:} false; then :
6762  $as_echo_n "(cached) " >&6
6763else
6764  case $DIFF in
6765  [\\/]* | ?:[\\/]*)
6766  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6767  ;;
6768  *)
6769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6770for as_dir in $PATH
6771do
6772  IFS=$as_save_IFS
6773  test -z "$as_dir" && as_dir=.
6774    for ac_exec_ext in '' $ac_executable_extensions; do
6775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6776    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6778    break 2
6779  fi
6780done
6781  done
6782IFS=$as_save_IFS
6783
6784  ;;
6785esac
6786fi
6787DIFF=$ac_cv_path_DIFF
6788if test -n "$DIFF"; then
6789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6790$as_echo "$DIFF" >&6; }
6791else
6792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6793$as_echo "no" >&6; }
6794fi
6795
6796
6797  test -n "$DIFF" && break
6798done
6799
6800    else
6801      # If it succeeded, then it was overridden by the user. We will use it
6802      # for the tool.
6803
6804      # First remove it from the list of overridden variables, so we can test
6805      # for unknown variables in the end.
6806      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6807
6808      # Check if we try to supply an empty value
6809      if test "x$DIFF" = x; then
6810        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6811$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6812        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6813$as_echo_n "checking for DIFF... " >&6; }
6814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6815$as_echo "disabled" >&6; }
6816      else
6817        # Check if the provided tool contains a complete path.
6818        tool_specified="$DIFF"
6819        tool_basename="${tool_specified##*/}"
6820        if test "x$tool_basename" = "x$tool_specified"; then
6821          # A command without a complete path is provided, search $PATH.
6822          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6823$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6824          # Extract the first word of "$tool_basename", so it can be a program name with args.
6825set dummy $tool_basename; ac_word=$2
6826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6827$as_echo_n "checking for $ac_word... " >&6; }
6828if ${ac_cv_path_DIFF+:} false; then :
6829  $as_echo_n "(cached) " >&6
6830else
6831  case $DIFF in
6832  [\\/]* | ?:[\\/]*)
6833  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6834  ;;
6835  *)
6836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6837for as_dir in $PATH
6838do
6839  IFS=$as_save_IFS
6840  test -z "$as_dir" && as_dir=.
6841    for ac_exec_ext in '' $ac_executable_extensions; do
6842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6843    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6845    break 2
6846  fi
6847done
6848  done
6849IFS=$as_save_IFS
6850
6851  ;;
6852esac
6853fi
6854DIFF=$ac_cv_path_DIFF
6855if test -n "$DIFF"; then
6856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6857$as_echo "$DIFF" >&6; }
6858else
6859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6860$as_echo "no" >&6; }
6861fi
6862
6863
6864          if test "x$DIFF" = x; then
6865            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6866          fi
6867        else
6868          # Otherwise we believe it is a complete path. Use it as it is.
6869          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6870$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6871          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6872$as_echo_n "checking for DIFF... " >&6; }
6873          if test ! -x "$tool_specified"; then
6874            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6875$as_echo "not found" >&6; }
6876            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6877          fi
6878          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6879$as_echo "$tool_specified" >&6; }
6880        fi
6881      fi
6882    fi
6883
6884  fi
6885
6886
6887
6888  if test "x$DIFF" = x; then
6889    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6890  fi
6891
6892
6893
6894
6895
6896  # Publish this variable in the help.
6897
6898
6899  if [ -z "${DIRNAME+x}" ]; then
6900    # The variable is not set by user, try to locate tool using the code snippet
6901    for ac_prog in dirname
6902do
6903  # Extract the first word of "$ac_prog", so it can be a program name with args.
6904set dummy $ac_prog; ac_word=$2
6905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6906$as_echo_n "checking for $ac_word... " >&6; }
6907if ${ac_cv_path_DIRNAME+:} false; then :
6908  $as_echo_n "(cached) " >&6
6909else
6910  case $DIRNAME in
6911  [\\/]* | ?:[\\/]*)
6912  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6913  ;;
6914  *)
6915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6916for as_dir in $PATH
6917do
6918  IFS=$as_save_IFS
6919  test -z "$as_dir" && as_dir=.
6920    for ac_exec_ext in '' $ac_executable_extensions; do
6921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6922    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6924    break 2
6925  fi
6926done
6927  done
6928IFS=$as_save_IFS
6929
6930  ;;
6931esac
6932fi
6933DIRNAME=$ac_cv_path_DIRNAME
6934if test -n "$DIRNAME"; then
6935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6936$as_echo "$DIRNAME" >&6; }
6937else
6938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6939$as_echo "no" >&6; }
6940fi
6941
6942
6943  test -n "$DIRNAME" && break
6944done
6945
6946  else
6947    # The variable is set, but is it from the command line or the environment?
6948
6949    # Try to remove the string !DIRNAME! from our list.
6950    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6951    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6952      # If it failed, the variable was not from the command line. Ignore it,
6953      # but warn the user (except for BASH, which is always set by the calling BASH).
6954      if test "xDIRNAME" != xBASH; then
6955        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6956$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6957      fi
6958      # Try to locate tool using the code snippet
6959      for ac_prog in dirname
6960do
6961  # Extract the first word of "$ac_prog", so it can be a program name with args.
6962set dummy $ac_prog; ac_word=$2
6963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6964$as_echo_n "checking for $ac_word... " >&6; }
6965if ${ac_cv_path_DIRNAME+:} false; then :
6966  $as_echo_n "(cached) " >&6
6967else
6968  case $DIRNAME in
6969  [\\/]* | ?:[\\/]*)
6970  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6971  ;;
6972  *)
6973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6974for as_dir in $PATH
6975do
6976  IFS=$as_save_IFS
6977  test -z "$as_dir" && as_dir=.
6978    for ac_exec_ext in '' $ac_executable_extensions; do
6979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6980    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6982    break 2
6983  fi
6984done
6985  done
6986IFS=$as_save_IFS
6987
6988  ;;
6989esac
6990fi
6991DIRNAME=$ac_cv_path_DIRNAME
6992if test -n "$DIRNAME"; then
6993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6994$as_echo "$DIRNAME" >&6; }
6995else
6996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6997$as_echo "no" >&6; }
6998fi
6999
7000
7001  test -n "$DIRNAME" && break
7002done
7003
7004    else
7005      # If it succeeded, then it was overridden by the user. We will use it
7006      # for the tool.
7007
7008      # First remove it from the list of overridden variables, so we can test
7009      # for unknown variables in the end.
7010      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7011
7012      # Check if we try to supply an empty value
7013      if test "x$DIRNAME" = x; then
7014        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7015$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7017$as_echo_n "checking for DIRNAME... " >&6; }
7018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7019$as_echo "disabled" >&6; }
7020      else
7021        # Check if the provided tool contains a complete path.
7022        tool_specified="$DIRNAME"
7023        tool_basename="${tool_specified##*/}"
7024        if test "x$tool_basename" = "x$tool_specified"; then
7025          # A command without a complete path is provided, search $PATH.
7026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7027$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7028          # Extract the first word of "$tool_basename", so it can be a program name with args.
7029set dummy $tool_basename; ac_word=$2
7030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7031$as_echo_n "checking for $ac_word... " >&6; }
7032if ${ac_cv_path_DIRNAME+:} false; then :
7033  $as_echo_n "(cached) " >&6
7034else
7035  case $DIRNAME in
7036  [\\/]* | ?:[\\/]*)
7037  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7038  ;;
7039  *)
7040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7041for as_dir in $PATH
7042do
7043  IFS=$as_save_IFS
7044  test -z "$as_dir" && as_dir=.
7045    for ac_exec_ext in '' $ac_executable_extensions; do
7046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7047    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7049    break 2
7050  fi
7051done
7052  done
7053IFS=$as_save_IFS
7054
7055  ;;
7056esac
7057fi
7058DIRNAME=$ac_cv_path_DIRNAME
7059if test -n "$DIRNAME"; then
7060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7061$as_echo "$DIRNAME" >&6; }
7062else
7063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7064$as_echo "no" >&6; }
7065fi
7066
7067
7068          if test "x$DIRNAME" = x; then
7069            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7070          fi
7071        else
7072          # Otherwise we believe it is a complete path. Use it as it is.
7073          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7074$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7075          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7076$as_echo_n "checking for DIRNAME... " >&6; }
7077          if test ! -x "$tool_specified"; then
7078            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7079$as_echo "not found" >&6; }
7080            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7081          fi
7082          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7083$as_echo "$tool_specified" >&6; }
7084        fi
7085      fi
7086    fi
7087
7088  fi
7089
7090
7091
7092  if test "x$DIRNAME" = x; then
7093    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7094  fi
7095
7096
7097
7098
7099
7100  # Publish this variable in the help.
7101
7102
7103  if [ -z "${ECHO+x}" ]; then
7104    # The variable is not set by user, try to locate tool using the code snippet
7105    for ac_prog in echo
7106do
7107  # Extract the first word of "$ac_prog", so it can be a program name with args.
7108set dummy $ac_prog; ac_word=$2
7109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7110$as_echo_n "checking for $ac_word... " >&6; }
7111if ${ac_cv_path_ECHO+:} false; then :
7112  $as_echo_n "(cached) " >&6
7113else
7114  case $ECHO in
7115  [\\/]* | ?:[\\/]*)
7116  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7117  ;;
7118  *)
7119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7120for as_dir in $PATH
7121do
7122  IFS=$as_save_IFS
7123  test -z "$as_dir" && as_dir=.
7124    for ac_exec_ext in '' $ac_executable_extensions; do
7125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7126    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7128    break 2
7129  fi
7130done
7131  done
7132IFS=$as_save_IFS
7133
7134  ;;
7135esac
7136fi
7137ECHO=$ac_cv_path_ECHO
7138if test -n "$ECHO"; then
7139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7140$as_echo "$ECHO" >&6; }
7141else
7142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7143$as_echo "no" >&6; }
7144fi
7145
7146
7147  test -n "$ECHO" && break
7148done
7149
7150  else
7151    # The variable is set, but is it from the command line or the environment?
7152
7153    # Try to remove the string !ECHO! from our list.
7154    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7155    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7156      # If it failed, the variable was not from the command line. Ignore it,
7157      # but warn the user (except for BASH, which is always set by the calling BASH).
7158      if test "xECHO" != xBASH; then
7159        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7160$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7161      fi
7162      # Try to locate tool using the code snippet
7163      for ac_prog in echo
7164do
7165  # Extract the first word of "$ac_prog", so it can be a program name with args.
7166set dummy $ac_prog; ac_word=$2
7167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7168$as_echo_n "checking for $ac_word... " >&6; }
7169if ${ac_cv_path_ECHO+:} false; then :
7170  $as_echo_n "(cached) " >&6
7171else
7172  case $ECHO in
7173  [\\/]* | ?:[\\/]*)
7174  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7175  ;;
7176  *)
7177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7178for as_dir in $PATH
7179do
7180  IFS=$as_save_IFS
7181  test -z "$as_dir" && as_dir=.
7182    for ac_exec_ext in '' $ac_executable_extensions; do
7183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7184    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7186    break 2
7187  fi
7188done
7189  done
7190IFS=$as_save_IFS
7191
7192  ;;
7193esac
7194fi
7195ECHO=$ac_cv_path_ECHO
7196if test -n "$ECHO"; then
7197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7198$as_echo "$ECHO" >&6; }
7199else
7200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7201$as_echo "no" >&6; }
7202fi
7203
7204
7205  test -n "$ECHO" && break
7206done
7207
7208    else
7209      # If it succeeded, then it was overridden by the user. We will use it
7210      # for the tool.
7211
7212      # First remove it from the list of overridden variables, so we can test
7213      # for unknown variables in the end.
7214      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7215
7216      # Check if we try to supply an empty value
7217      if test "x$ECHO" = x; then
7218        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7219$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7220        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7221$as_echo_n "checking for ECHO... " >&6; }
7222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7223$as_echo "disabled" >&6; }
7224      else
7225        # Check if the provided tool contains a complete path.
7226        tool_specified="$ECHO"
7227        tool_basename="${tool_specified##*/}"
7228        if test "x$tool_basename" = "x$tool_specified"; then
7229          # A command without a complete path is provided, search $PATH.
7230          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7231$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7232          # Extract the first word of "$tool_basename", so it can be a program name with args.
7233set dummy $tool_basename; ac_word=$2
7234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7235$as_echo_n "checking for $ac_word... " >&6; }
7236if ${ac_cv_path_ECHO+:} false; then :
7237  $as_echo_n "(cached) " >&6
7238else
7239  case $ECHO in
7240  [\\/]* | ?:[\\/]*)
7241  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7242  ;;
7243  *)
7244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7245for as_dir in $PATH
7246do
7247  IFS=$as_save_IFS
7248  test -z "$as_dir" && as_dir=.
7249    for ac_exec_ext in '' $ac_executable_extensions; do
7250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7251    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7253    break 2
7254  fi
7255done
7256  done
7257IFS=$as_save_IFS
7258
7259  ;;
7260esac
7261fi
7262ECHO=$ac_cv_path_ECHO
7263if test -n "$ECHO"; then
7264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7265$as_echo "$ECHO" >&6; }
7266else
7267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7268$as_echo "no" >&6; }
7269fi
7270
7271
7272          if test "x$ECHO" = x; then
7273            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7274          fi
7275        else
7276          # Otherwise we believe it is a complete path. Use it as it is.
7277          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7278$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7279          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7280$as_echo_n "checking for ECHO... " >&6; }
7281          if test ! -x "$tool_specified"; then
7282            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7283$as_echo "not found" >&6; }
7284            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7285          fi
7286          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7287$as_echo "$tool_specified" >&6; }
7288        fi
7289      fi
7290    fi
7291
7292  fi
7293
7294
7295
7296  if test "x$ECHO" = x; then
7297    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7298  fi
7299
7300
7301
7302
7303
7304  # Publish this variable in the help.
7305
7306
7307  if [ -z "${EXPR+x}" ]; then
7308    # The variable is not set by user, try to locate tool using the code snippet
7309    for ac_prog in expr
7310do
7311  # Extract the first word of "$ac_prog", so it can be a program name with args.
7312set dummy $ac_prog; ac_word=$2
7313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7314$as_echo_n "checking for $ac_word... " >&6; }
7315if ${ac_cv_path_EXPR+:} false; then :
7316  $as_echo_n "(cached) " >&6
7317else
7318  case $EXPR in
7319  [\\/]* | ?:[\\/]*)
7320  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7321  ;;
7322  *)
7323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7324for as_dir in $PATH
7325do
7326  IFS=$as_save_IFS
7327  test -z "$as_dir" && as_dir=.
7328    for ac_exec_ext in '' $ac_executable_extensions; do
7329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7330    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7332    break 2
7333  fi
7334done
7335  done
7336IFS=$as_save_IFS
7337
7338  ;;
7339esac
7340fi
7341EXPR=$ac_cv_path_EXPR
7342if test -n "$EXPR"; then
7343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7344$as_echo "$EXPR" >&6; }
7345else
7346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7347$as_echo "no" >&6; }
7348fi
7349
7350
7351  test -n "$EXPR" && break
7352done
7353
7354  else
7355    # The variable is set, but is it from the command line or the environment?
7356
7357    # Try to remove the string !EXPR! from our list.
7358    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7359    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7360      # If it failed, the variable was not from the command line. Ignore it,
7361      # but warn the user (except for BASH, which is always set by the calling BASH).
7362      if test "xEXPR" != xBASH; then
7363        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7364$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7365      fi
7366      # Try to locate tool using the code snippet
7367      for ac_prog in expr
7368do
7369  # Extract the first word of "$ac_prog", so it can be a program name with args.
7370set dummy $ac_prog; ac_word=$2
7371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7372$as_echo_n "checking for $ac_word... " >&6; }
7373if ${ac_cv_path_EXPR+:} false; then :
7374  $as_echo_n "(cached) " >&6
7375else
7376  case $EXPR in
7377  [\\/]* | ?:[\\/]*)
7378  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7379  ;;
7380  *)
7381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7382for as_dir in $PATH
7383do
7384  IFS=$as_save_IFS
7385  test -z "$as_dir" && as_dir=.
7386    for ac_exec_ext in '' $ac_executable_extensions; do
7387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7388    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7390    break 2
7391  fi
7392done
7393  done
7394IFS=$as_save_IFS
7395
7396  ;;
7397esac
7398fi
7399EXPR=$ac_cv_path_EXPR
7400if test -n "$EXPR"; then
7401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7402$as_echo "$EXPR" >&6; }
7403else
7404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7405$as_echo "no" >&6; }
7406fi
7407
7408
7409  test -n "$EXPR" && break
7410done
7411
7412    else
7413      # If it succeeded, then it was overridden by the user. We will use it
7414      # for the tool.
7415
7416      # First remove it from the list of overridden variables, so we can test
7417      # for unknown variables in the end.
7418      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7419
7420      # Check if we try to supply an empty value
7421      if test "x$EXPR" = x; then
7422        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7423$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7424        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7425$as_echo_n "checking for EXPR... " >&6; }
7426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7427$as_echo "disabled" >&6; }
7428      else
7429        # Check if the provided tool contains a complete path.
7430        tool_specified="$EXPR"
7431        tool_basename="${tool_specified##*/}"
7432        if test "x$tool_basename" = "x$tool_specified"; then
7433          # A command without a complete path is provided, search $PATH.
7434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7435$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7436          # Extract the first word of "$tool_basename", so it can be a program name with args.
7437set dummy $tool_basename; ac_word=$2
7438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7439$as_echo_n "checking for $ac_word... " >&6; }
7440if ${ac_cv_path_EXPR+:} false; then :
7441  $as_echo_n "(cached) " >&6
7442else
7443  case $EXPR in
7444  [\\/]* | ?:[\\/]*)
7445  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7446  ;;
7447  *)
7448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7449for as_dir in $PATH
7450do
7451  IFS=$as_save_IFS
7452  test -z "$as_dir" && as_dir=.
7453    for ac_exec_ext in '' $ac_executable_extensions; do
7454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7455    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7457    break 2
7458  fi
7459done
7460  done
7461IFS=$as_save_IFS
7462
7463  ;;
7464esac
7465fi
7466EXPR=$ac_cv_path_EXPR
7467if test -n "$EXPR"; then
7468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7469$as_echo "$EXPR" >&6; }
7470else
7471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7472$as_echo "no" >&6; }
7473fi
7474
7475
7476          if test "x$EXPR" = x; then
7477            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7478          fi
7479        else
7480          # Otherwise we believe it is a complete path. Use it as it is.
7481          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7482$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7483          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7484$as_echo_n "checking for EXPR... " >&6; }
7485          if test ! -x "$tool_specified"; then
7486            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7487$as_echo "not found" >&6; }
7488            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7489          fi
7490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7491$as_echo "$tool_specified" >&6; }
7492        fi
7493      fi
7494    fi
7495
7496  fi
7497
7498
7499
7500  if test "x$EXPR" = x; then
7501    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7502  fi
7503
7504
7505
7506
7507
7508  # Publish this variable in the help.
7509
7510
7511  if [ -z "${FILE+x}" ]; then
7512    # The variable is not set by user, try to locate tool using the code snippet
7513    for ac_prog in file
7514do
7515  # Extract the first word of "$ac_prog", so it can be a program name with args.
7516set dummy $ac_prog; ac_word=$2
7517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7518$as_echo_n "checking for $ac_word... " >&6; }
7519if ${ac_cv_path_FILE+:} false; then :
7520  $as_echo_n "(cached) " >&6
7521else
7522  case $FILE in
7523  [\\/]* | ?:[\\/]*)
7524  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7525  ;;
7526  *)
7527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7528for as_dir in $PATH
7529do
7530  IFS=$as_save_IFS
7531  test -z "$as_dir" && as_dir=.
7532    for ac_exec_ext in '' $ac_executable_extensions; do
7533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7534    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7536    break 2
7537  fi
7538done
7539  done
7540IFS=$as_save_IFS
7541
7542  ;;
7543esac
7544fi
7545FILE=$ac_cv_path_FILE
7546if test -n "$FILE"; then
7547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7548$as_echo "$FILE" >&6; }
7549else
7550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7551$as_echo "no" >&6; }
7552fi
7553
7554
7555  test -n "$FILE" && break
7556done
7557
7558  else
7559    # The variable is set, but is it from the command line or the environment?
7560
7561    # Try to remove the string !FILE! from our list.
7562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7564      # If it failed, the variable was not from the command line. Ignore it,
7565      # but warn the user (except for BASH, which is always set by the calling BASH).
7566      if test "xFILE" != xBASH; then
7567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7568$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7569      fi
7570      # Try to locate tool using the code snippet
7571      for ac_prog in file
7572do
7573  # Extract the first word of "$ac_prog", so it can be a program name with args.
7574set dummy $ac_prog; ac_word=$2
7575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7576$as_echo_n "checking for $ac_word... " >&6; }
7577if ${ac_cv_path_FILE+:} false; then :
7578  $as_echo_n "(cached) " >&6
7579else
7580  case $FILE in
7581  [\\/]* | ?:[\\/]*)
7582  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7583  ;;
7584  *)
7585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7586for as_dir in $PATH
7587do
7588  IFS=$as_save_IFS
7589  test -z "$as_dir" && as_dir=.
7590    for ac_exec_ext in '' $ac_executable_extensions; do
7591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7592    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7594    break 2
7595  fi
7596done
7597  done
7598IFS=$as_save_IFS
7599
7600  ;;
7601esac
7602fi
7603FILE=$ac_cv_path_FILE
7604if test -n "$FILE"; then
7605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7606$as_echo "$FILE" >&6; }
7607else
7608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7609$as_echo "no" >&6; }
7610fi
7611
7612
7613  test -n "$FILE" && break
7614done
7615
7616    else
7617      # If it succeeded, then it was overridden by the user. We will use it
7618      # for the tool.
7619
7620      # First remove it from the list of overridden variables, so we can test
7621      # for unknown variables in the end.
7622      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7623
7624      # Check if we try to supply an empty value
7625      if test "x$FILE" = x; then
7626        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7627$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7628        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7629$as_echo_n "checking for FILE... " >&6; }
7630        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7631$as_echo "disabled" >&6; }
7632      else
7633        # Check if the provided tool contains a complete path.
7634        tool_specified="$FILE"
7635        tool_basename="${tool_specified##*/}"
7636        if test "x$tool_basename" = "x$tool_specified"; then
7637          # A command without a complete path is provided, search $PATH.
7638          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7639$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7640          # Extract the first word of "$tool_basename", so it can be a program name with args.
7641set dummy $tool_basename; ac_word=$2
7642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7643$as_echo_n "checking for $ac_word... " >&6; }
7644if ${ac_cv_path_FILE+:} false; then :
7645  $as_echo_n "(cached) " >&6
7646else
7647  case $FILE in
7648  [\\/]* | ?:[\\/]*)
7649  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7650  ;;
7651  *)
7652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7653for as_dir in $PATH
7654do
7655  IFS=$as_save_IFS
7656  test -z "$as_dir" && as_dir=.
7657    for ac_exec_ext in '' $ac_executable_extensions; do
7658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7659    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7661    break 2
7662  fi
7663done
7664  done
7665IFS=$as_save_IFS
7666
7667  ;;
7668esac
7669fi
7670FILE=$ac_cv_path_FILE
7671if test -n "$FILE"; then
7672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7673$as_echo "$FILE" >&6; }
7674else
7675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7676$as_echo "no" >&6; }
7677fi
7678
7679
7680          if test "x$FILE" = x; then
7681            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7682          fi
7683        else
7684          # Otherwise we believe it is a complete path. Use it as it is.
7685          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7686$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7687          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7688$as_echo_n "checking for FILE... " >&6; }
7689          if test ! -x "$tool_specified"; then
7690            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7691$as_echo "not found" >&6; }
7692            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7693          fi
7694          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7695$as_echo "$tool_specified" >&6; }
7696        fi
7697      fi
7698    fi
7699
7700  fi
7701
7702
7703
7704  if test "x$FILE" = x; then
7705    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7706  fi
7707
7708
7709
7710
7711
7712  # Publish this variable in the help.
7713
7714
7715  if [ -z "${FIND+x}" ]; then
7716    # The variable is not set by user, try to locate tool using the code snippet
7717    for ac_prog in find
7718do
7719  # Extract the first word of "$ac_prog", so it can be a program name with args.
7720set dummy $ac_prog; ac_word=$2
7721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7722$as_echo_n "checking for $ac_word... " >&6; }
7723if ${ac_cv_path_FIND+:} false; then :
7724  $as_echo_n "(cached) " >&6
7725else
7726  case $FIND in
7727  [\\/]* | ?:[\\/]*)
7728  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7729  ;;
7730  *)
7731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7732for as_dir in $PATH
7733do
7734  IFS=$as_save_IFS
7735  test -z "$as_dir" && as_dir=.
7736    for ac_exec_ext in '' $ac_executable_extensions; do
7737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7738    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7740    break 2
7741  fi
7742done
7743  done
7744IFS=$as_save_IFS
7745
7746  ;;
7747esac
7748fi
7749FIND=$ac_cv_path_FIND
7750if test -n "$FIND"; then
7751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7752$as_echo "$FIND" >&6; }
7753else
7754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7755$as_echo "no" >&6; }
7756fi
7757
7758
7759  test -n "$FIND" && break
7760done
7761
7762  else
7763    # The variable is set, but is it from the command line or the environment?
7764
7765    # Try to remove the string !FIND! from our list.
7766    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7767    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7768      # If it failed, the variable was not from the command line. Ignore it,
7769      # but warn the user (except for BASH, which is always set by the calling BASH).
7770      if test "xFIND" != xBASH; then
7771        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7772$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7773      fi
7774      # Try to locate tool using the code snippet
7775      for ac_prog in find
7776do
7777  # Extract the first word of "$ac_prog", so it can be a program name with args.
7778set dummy $ac_prog; ac_word=$2
7779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7780$as_echo_n "checking for $ac_word... " >&6; }
7781if ${ac_cv_path_FIND+:} false; then :
7782  $as_echo_n "(cached) " >&6
7783else
7784  case $FIND in
7785  [\\/]* | ?:[\\/]*)
7786  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7787  ;;
7788  *)
7789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7790for as_dir in $PATH
7791do
7792  IFS=$as_save_IFS
7793  test -z "$as_dir" && as_dir=.
7794    for ac_exec_ext in '' $ac_executable_extensions; do
7795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7796    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7798    break 2
7799  fi
7800done
7801  done
7802IFS=$as_save_IFS
7803
7804  ;;
7805esac
7806fi
7807FIND=$ac_cv_path_FIND
7808if test -n "$FIND"; then
7809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7810$as_echo "$FIND" >&6; }
7811else
7812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7813$as_echo "no" >&6; }
7814fi
7815
7816
7817  test -n "$FIND" && break
7818done
7819
7820    else
7821      # If it succeeded, then it was overridden by the user. We will use it
7822      # for the tool.
7823
7824      # First remove it from the list of overridden variables, so we can test
7825      # for unknown variables in the end.
7826      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7827
7828      # Check if we try to supply an empty value
7829      if test "x$FIND" = x; then
7830        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7831$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7832        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7833$as_echo_n "checking for FIND... " >&6; }
7834        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7835$as_echo "disabled" >&6; }
7836      else
7837        # Check if the provided tool contains a complete path.
7838        tool_specified="$FIND"
7839        tool_basename="${tool_specified##*/}"
7840        if test "x$tool_basename" = "x$tool_specified"; then
7841          # A command without a complete path is provided, search $PATH.
7842          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7843$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7844          # Extract the first word of "$tool_basename", so it can be a program name with args.
7845set dummy $tool_basename; ac_word=$2
7846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7847$as_echo_n "checking for $ac_word... " >&6; }
7848if ${ac_cv_path_FIND+:} false; then :
7849  $as_echo_n "(cached) " >&6
7850else
7851  case $FIND in
7852  [\\/]* | ?:[\\/]*)
7853  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7854  ;;
7855  *)
7856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7857for as_dir in $PATH
7858do
7859  IFS=$as_save_IFS
7860  test -z "$as_dir" && as_dir=.
7861    for ac_exec_ext in '' $ac_executable_extensions; do
7862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7863    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7865    break 2
7866  fi
7867done
7868  done
7869IFS=$as_save_IFS
7870
7871  ;;
7872esac
7873fi
7874FIND=$ac_cv_path_FIND
7875if test -n "$FIND"; then
7876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7877$as_echo "$FIND" >&6; }
7878else
7879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7880$as_echo "no" >&6; }
7881fi
7882
7883
7884          if test "x$FIND" = x; then
7885            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7886          fi
7887        else
7888          # Otherwise we believe it is a complete path. Use it as it is.
7889          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7890$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7891          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7892$as_echo_n "checking for FIND... " >&6; }
7893          if test ! -x "$tool_specified"; then
7894            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7895$as_echo "not found" >&6; }
7896            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7897          fi
7898          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7899$as_echo "$tool_specified" >&6; }
7900        fi
7901      fi
7902    fi
7903
7904  fi
7905
7906
7907
7908  if test "x$FIND" = x; then
7909    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7910  fi
7911
7912
7913
7914
7915
7916  # Publish this variable in the help.
7917
7918
7919  if [ -z "${HEAD+x}" ]; then
7920    # The variable is not set by user, try to locate tool using the code snippet
7921    for ac_prog in head
7922do
7923  # Extract the first word of "$ac_prog", so it can be a program name with args.
7924set dummy $ac_prog; ac_word=$2
7925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7926$as_echo_n "checking for $ac_word... " >&6; }
7927if ${ac_cv_path_HEAD+:} false; then :
7928  $as_echo_n "(cached) " >&6
7929else
7930  case $HEAD in
7931  [\\/]* | ?:[\\/]*)
7932  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7933  ;;
7934  *)
7935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7936for as_dir in $PATH
7937do
7938  IFS=$as_save_IFS
7939  test -z "$as_dir" && as_dir=.
7940    for ac_exec_ext in '' $ac_executable_extensions; do
7941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7942    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7944    break 2
7945  fi
7946done
7947  done
7948IFS=$as_save_IFS
7949
7950  ;;
7951esac
7952fi
7953HEAD=$ac_cv_path_HEAD
7954if test -n "$HEAD"; then
7955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7956$as_echo "$HEAD" >&6; }
7957else
7958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7959$as_echo "no" >&6; }
7960fi
7961
7962
7963  test -n "$HEAD" && break
7964done
7965
7966  else
7967    # The variable is set, but is it from the command line or the environment?
7968
7969    # Try to remove the string !HEAD! from our list.
7970    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7971    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7972      # If it failed, the variable was not from the command line. Ignore it,
7973      # but warn the user (except for BASH, which is always set by the calling BASH).
7974      if test "xHEAD" != xBASH; then
7975        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7976$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7977      fi
7978      # Try to locate tool using the code snippet
7979      for ac_prog in head
7980do
7981  # Extract the first word of "$ac_prog", so it can be a program name with args.
7982set dummy $ac_prog; ac_word=$2
7983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7984$as_echo_n "checking for $ac_word... " >&6; }
7985if ${ac_cv_path_HEAD+:} false; then :
7986  $as_echo_n "(cached) " >&6
7987else
7988  case $HEAD in
7989  [\\/]* | ?:[\\/]*)
7990  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7991  ;;
7992  *)
7993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7994for as_dir in $PATH
7995do
7996  IFS=$as_save_IFS
7997  test -z "$as_dir" && as_dir=.
7998    for ac_exec_ext in '' $ac_executable_extensions; do
7999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8000    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8002    break 2
8003  fi
8004done
8005  done
8006IFS=$as_save_IFS
8007
8008  ;;
8009esac
8010fi
8011HEAD=$ac_cv_path_HEAD
8012if test -n "$HEAD"; then
8013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8014$as_echo "$HEAD" >&6; }
8015else
8016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8017$as_echo "no" >&6; }
8018fi
8019
8020
8021  test -n "$HEAD" && break
8022done
8023
8024    else
8025      # If it succeeded, then it was overridden by the user. We will use it
8026      # for the tool.
8027
8028      # First remove it from the list of overridden variables, so we can test
8029      # for unknown variables in the end.
8030      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8031
8032      # Check if we try to supply an empty value
8033      if test "x$HEAD" = x; then
8034        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8035$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8036        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8037$as_echo_n "checking for HEAD... " >&6; }
8038        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8039$as_echo "disabled" >&6; }
8040      else
8041        # Check if the provided tool contains a complete path.
8042        tool_specified="$HEAD"
8043        tool_basename="${tool_specified##*/}"
8044        if test "x$tool_basename" = "x$tool_specified"; then
8045          # A command without a complete path is provided, search $PATH.
8046          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8047$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8048          # Extract the first word of "$tool_basename", so it can be a program name with args.
8049set dummy $tool_basename; ac_word=$2
8050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8051$as_echo_n "checking for $ac_word... " >&6; }
8052if ${ac_cv_path_HEAD+:} false; then :
8053  $as_echo_n "(cached) " >&6
8054else
8055  case $HEAD in
8056  [\\/]* | ?:[\\/]*)
8057  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8058  ;;
8059  *)
8060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8061for as_dir in $PATH
8062do
8063  IFS=$as_save_IFS
8064  test -z "$as_dir" && as_dir=.
8065    for ac_exec_ext in '' $ac_executable_extensions; do
8066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8067    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8069    break 2
8070  fi
8071done
8072  done
8073IFS=$as_save_IFS
8074
8075  ;;
8076esac
8077fi
8078HEAD=$ac_cv_path_HEAD
8079if test -n "$HEAD"; then
8080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8081$as_echo "$HEAD" >&6; }
8082else
8083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8084$as_echo "no" >&6; }
8085fi
8086
8087
8088          if test "x$HEAD" = x; then
8089            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8090          fi
8091        else
8092          # Otherwise we believe it is a complete path. Use it as it is.
8093          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8094$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8095          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8096$as_echo_n "checking for HEAD... " >&6; }
8097          if test ! -x "$tool_specified"; then
8098            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8099$as_echo "not found" >&6; }
8100            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8101          fi
8102          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8103$as_echo "$tool_specified" >&6; }
8104        fi
8105      fi
8106    fi
8107
8108  fi
8109
8110
8111
8112  if test "x$HEAD" = x; then
8113    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8114  fi
8115
8116
8117
8118
8119
8120  # Publish this variable in the help.
8121
8122
8123  if [ -z "${LN+x}" ]; then
8124    # The variable is not set by user, try to locate tool using the code snippet
8125    for ac_prog in ln
8126do
8127  # Extract the first word of "$ac_prog", so it can be a program name with args.
8128set dummy $ac_prog; ac_word=$2
8129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8130$as_echo_n "checking for $ac_word... " >&6; }
8131if ${ac_cv_path_LN+:} false; then :
8132  $as_echo_n "(cached) " >&6
8133else
8134  case $LN in
8135  [\\/]* | ?:[\\/]*)
8136  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8137  ;;
8138  *)
8139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8140for as_dir in $PATH
8141do
8142  IFS=$as_save_IFS
8143  test -z "$as_dir" && as_dir=.
8144    for ac_exec_ext in '' $ac_executable_extensions; do
8145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8146    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8148    break 2
8149  fi
8150done
8151  done
8152IFS=$as_save_IFS
8153
8154  ;;
8155esac
8156fi
8157LN=$ac_cv_path_LN
8158if test -n "$LN"; then
8159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8160$as_echo "$LN" >&6; }
8161else
8162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8163$as_echo "no" >&6; }
8164fi
8165
8166
8167  test -n "$LN" && break
8168done
8169
8170  else
8171    # The variable is set, but is it from the command line or the environment?
8172
8173    # Try to remove the string !LN! from our list.
8174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8176      # If it failed, the variable was not from the command line. Ignore it,
8177      # but warn the user (except for BASH, which is always set by the calling BASH).
8178      if test "xLN" != xBASH; then
8179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8180$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8181      fi
8182      # Try to locate tool using the code snippet
8183      for ac_prog in ln
8184do
8185  # Extract the first word of "$ac_prog", so it can be a program name with args.
8186set dummy $ac_prog; ac_word=$2
8187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8188$as_echo_n "checking for $ac_word... " >&6; }
8189if ${ac_cv_path_LN+:} false; then :
8190  $as_echo_n "(cached) " >&6
8191else
8192  case $LN in
8193  [\\/]* | ?:[\\/]*)
8194  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8195  ;;
8196  *)
8197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8198for as_dir in $PATH
8199do
8200  IFS=$as_save_IFS
8201  test -z "$as_dir" && as_dir=.
8202    for ac_exec_ext in '' $ac_executable_extensions; do
8203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8204    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8206    break 2
8207  fi
8208done
8209  done
8210IFS=$as_save_IFS
8211
8212  ;;
8213esac
8214fi
8215LN=$ac_cv_path_LN
8216if test -n "$LN"; then
8217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8218$as_echo "$LN" >&6; }
8219else
8220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8221$as_echo "no" >&6; }
8222fi
8223
8224
8225  test -n "$LN" && break
8226done
8227
8228    else
8229      # If it succeeded, then it was overridden by the user. We will use it
8230      # for the tool.
8231
8232      # First remove it from the list of overridden variables, so we can test
8233      # for unknown variables in the end.
8234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8235
8236      # Check if we try to supply an empty value
8237      if test "x$LN" = x; then
8238        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8239$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8241$as_echo_n "checking for LN... " >&6; }
8242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8243$as_echo "disabled" >&6; }
8244      else
8245        # Check if the provided tool contains a complete path.
8246        tool_specified="$LN"
8247        tool_basename="${tool_specified##*/}"
8248        if test "x$tool_basename" = "x$tool_specified"; then
8249          # A command without a complete path is provided, search $PATH.
8250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8251$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8252          # Extract the first word of "$tool_basename", so it can be a program name with args.
8253set dummy $tool_basename; ac_word=$2
8254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8255$as_echo_n "checking for $ac_word... " >&6; }
8256if ${ac_cv_path_LN+:} false; then :
8257  $as_echo_n "(cached) " >&6
8258else
8259  case $LN in
8260  [\\/]* | ?:[\\/]*)
8261  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8262  ;;
8263  *)
8264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8265for as_dir in $PATH
8266do
8267  IFS=$as_save_IFS
8268  test -z "$as_dir" && as_dir=.
8269    for ac_exec_ext in '' $ac_executable_extensions; do
8270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8271    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8273    break 2
8274  fi
8275done
8276  done
8277IFS=$as_save_IFS
8278
8279  ;;
8280esac
8281fi
8282LN=$ac_cv_path_LN
8283if test -n "$LN"; then
8284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8285$as_echo "$LN" >&6; }
8286else
8287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8288$as_echo "no" >&6; }
8289fi
8290
8291
8292          if test "x$LN" = x; then
8293            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8294          fi
8295        else
8296          # Otherwise we believe it is a complete path. Use it as it is.
8297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8298$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8299          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8300$as_echo_n "checking for LN... " >&6; }
8301          if test ! -x "$tool_specified"; then
8302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8303$as_echo "not found" >&6; }
8304            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8305          fi
8306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8307$as_echo "$tool_specified" >&6; }
8308        fi
8309      fi
8310    fi
8311
8312  fi
8313
8314
8315
8316  if test "x$LN" = x; then
8317    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8318  fi
8319
8320
8321
8322
8323
8324  # Publish this variable in the help.
8325
8326
8327  if [ -z "${LS+x}" ]; then
8328    # The variable is not set by user, try to locate tool using the code snippet
8329    for ac_prog in ls
8330do
8331  # Extract the first word of "$ac_prog", so it can be a program name with args.
8332set dummy $ac_prog; ac_word=$2
8333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8334$as_echo_n "checking for $ac_word... " >&6; }
8335if ${ac_cv_path_LS+:} false; then :
8336  $as_echo_n "(cached) " >&6
8337else
8338  case $LS in
8339  [\\/]* | ?:[\\/]*)
8340  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8341  ;;
8342  *)
8343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8344for as_dir in $PATH
8345do
8346  IFS=$as_save_IFS
8347  test -z "$as_dir" && as_dir=.
8348    for ac_exec_ext in '' $ac_executable_extensions; do
8349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8350    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8352    break 2
8353  fi
8354done
8355  done
8356IFS=$as_save_IFS
8357
8358  ;;
8359esac
8360fi
8361LS=$ac_cv_path_LS
8362if test -n "$LS"; then
8363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8364$as_echo "$LS" >&6; }
8365else
8366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8367$as_echo "no" >&6; }
8368fi
8369
8370
8371  test -n "$LS" && break
8372done
8373
8374  else
8375    # The variable is set, but is it from the command line or the environment?
8376
8377    # Try to remove the string !LS! from our list.
8378    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8379    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8380      # If it failed, the variable was not from the command line. Ignore it,
8381      # but warn the user (except for BASH, which is always set by the calling BASH).
8382      if test "xLS" != xBASH; then
8383        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8384$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8385      fi
8386      # Try to locate tool using the code snippet
8387      for ac_prog in ls
8388do
8389  # Extract the first word of "$ac_prog", so it can be a program name with args.
8390set dummy $ac_prog; ac_word=$2
8391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8392$as_echo_n "checking for $ac_word... " >&6; }
8393if ${ac_cv_path_LS+:} false; then :
8394  $as_echo_n "(cached) " >&6
8395else
8396  case $LS in
8397  [\\/]* | ?:[\\/]*)
8398  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8399  ;;
8400  *)
8401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8402for as_dir in $PATH
8403do
8404  IFS=$as_save_IFS
8405  test -z "$as_dir" && as_dir=.
8406    for ac_exec_ext in '' $ac_executable_extensions; do
8407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8408    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8410    break 2
8411  fi
8412done
8413  done
8414IFS=$as_save_IFS
8415
8416  ;;
8417esac
8418fi
8419LS=$ac_cv_path_LS
8420if test -n "$LS"; then
8421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8422$as_echo "$LS" >&6; }
8423else
8424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8425$as_echo "no" >&6; }
8426fi
8427
8428
8429  test -n "$LS" && break
8430done
8431
8432    else
8433      # If it succeeded, then it was overridden by the user. We will use it
8434      # for the tool.
8435
8436      # First remove it from the list of overridden variables, so we can test
8437      # for unknown variables in the end.
8438      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8439
8440      # Check if we try to supply an empty value
8441      if test "x$LS" = x; then
8442        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8443$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8444        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8445$as_echo_n "checking for LS... " >&6; }
8446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8447$as_echo "disabled" >&6; }
8448      else
8449        # Check if the provided tool contains a complete path.
8450        tool_specified="$LS"
8451        tool_basename="${tool_specified##*/}"
8452        if test "x$tool_basename" = "x$tool_specified"; then
8453          # A command without a complete path is provided, search $PATH.
8454          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8455$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8456          # Extract the first word of "$tool_basename", so it can be a program name with args.
8457set dummy $tool_basename; ac_word=$2
8458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8459$as_echo_n "checking for $ac_word... " >&6; }
8460if ${ac_cv_path_LS+:} false; then :
8461  $as_echo_n "(cached) " >&6
8462else
8463  case $LS in
8464  [\\/]* | ?:[\\/]*)
8465  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8466  ;;
8467  *)
8468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8469for as_dir in $PATH
8470do
8471  IFS=$as_save_IFS
8472  test -z "$as_dir" && as_dir=.
8473    for ac_exec_ext in '' $ac_executable_extensions; do
8474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8475    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8477    break 2
8478  fi
8479done
8480  done
8481IFS=$as_save_IFS
8482
8483  ;;
8484esac
8485fi
8486LS=$ac_cv_path_LS
8487if test -n "$LS"; then
8488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8489$as_echo "$LS" >&6; }
8490else
8491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8492$as_echo "no" >&6; }
8493fi
8494
8495
8496          if test "x$LS" = x; then
8497            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8498          fi
8499        else
8500          # Otherwise we believe it is a complete path. Use it as it is.
8501          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8502$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8503          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8504$as_echo_n "checking for LS... " >&6; }
8505          if test ! -x "$tool_specified"; then
8506            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8507$as_echo "not found" >&6; }
8508            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8509          fi
8510          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8511$as_echo "$tool_specified" >&6; }
8512        fi
8513      fi
8514    fi
8515
8516  fi
8517
8518
8519
8520  if test "x$LS" = x; then
8521    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8522  fi
8523
8524
8525
8526
8527
8528  # Publish this variable in the help.
8529
8530
8531  if [ -z "${MKDIR+x}" ]; then
8532    # The variable is not set by user, try to locate tool using the code snippet
8533    for ac_prog in mkdir
8534do
8535  # Extract the first word of "$ac_prog", so it can be a program name with args.
8536set dummy $ac_prog; ac_word=$2
8537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8538$as_echo_n "checking for $ac_word... " >&6; }
8539if ${ac_cv_path_MKDIR+:} false; then :
8540  $as_echo_n "(cached) " >&6
8541else
8542  case $MKDIR in
8543  [\\/]* | ?:[\\/]*)
8544  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8545  ;;
8546  *)
8547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8548for as_dir in $PATH
8549do
8550  IFS=$as_save_IFS
8551  test -z "$as_dir" && as_dir=.
8552    for ac_exec_ext in '' $ac_executable_extensions; do
8553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8554    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8556    break 2
8557  fi
8558done
8559  done
8560IFS=$as_save_IFS
8561
8562  ;;
8563esac
8564fi
8565MKDIR=$ac_cv_path_MKDIR
8566if test -n "$MKDIR"; then
8567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8568$as_echo "$MKDIR" >&6; }
8569else
8570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8571$as_echo "no" >&6; }
8572fi
8573
8574
8575  test -n "$MKDIR" && break
8576done
8577
8578  else
8579    # The variable is set, but is it from the command line or the environment?
8580
8581    # Try to remove the string !MKDIR! from our list.
8582    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8583    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8584      # If it failed, the variable was not from the command line. Ignore it,
8585      # but warn the user (except for BASH, which is always set by the calling BASH).
8586      if test "xMKDIR" != xBASH; then
8587        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8588$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8589      fi
8590      # Try to locate tool using the code snippet
8591      for ac_prog in mkdir
8592do
8593  # Extract the first word of "$ac_prog", so it can be a program name with args.
8594set dummy $ac_prog; ac_word=$2
8595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8596$as_echo_n "checking for $ac_word... " >&6; }
8597if ${ac_cv_path_MKDIR+:} false; then :
8598  $as_echo_n "(cached) " >&6
8599else
8600  case $MKDIR in
8601  [\\/]* | ?:[\\/]*)
8602  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8603  ;;
8604  *)
8605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8606for as_dir in $PATH
8607do
8608  IFS=$as_save_IFS
8609  test -z "$as_dir" && as_dir=.
8610    for ac_exec_ext in '' $ac_executable_extensions; do
8611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8612    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8614    break 2
8615  fi
8616done
8617  done
8618IFS=$as_save_IFS
8619
8620  ;;
8621esac
8622fi
8623MKDIR=$ac_cv_path_MKDIR
8624if test -n "$MKDIR"; then
8625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8626$as_echo "$MKDIR" >&6; }
8627else
8628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8629$as_echo "no" >&6; }
8630fi
8631
8632
8633  test -n "$MKDIR" && break
8634done
8635
8636    else
8637      # If it succeeded, then it was overridden by the user. We will use it
8638      # for the tool.
8639
8640      # First remove it from the list of overridden variables, so we can test
8641      # for unknown variables in the end.
8642      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8643
8644      # Check if we try to supply an empty value
8645      if test "x$MKDIR" = x; then
8646        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8647$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8648        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8649$as_echo_n "checking for MKDIR... " >&6; }
8650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8651$as_echo "disabled" >&6; }
8652      else
8653        # Check if the provided tool contains a complete path.
8654        tool_specified="$MKDIR"
8655        tool_basename="${tool_specified##*/}"
8656        if test "x$tool_basename" = "x$tool_specified"; then
8657          # A command without a complete path is provided, search $PATH.
8658          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8659$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8660          # Extract the first word of "$tool_basename", so it can be a program name with args.
8661set dummy $tool_basename; ac_word=$2
8662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8663$as_echo_n "checking for $ac_word... " >&6; }
8664if ${ac_cv_path_MKDIR+:} false; then :
8665  $as_echo_n "(cached) " >&6
8666else
8667  case $MKDIR in
8668  [\\/]* | ?:[\\/]*)
8669  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8670  ;;
8671  *)
8672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8673for as_dir in $PATH
8674do
8675  IFS=$as_save_IFS
8676  test -z "$as_dir" && as_dir=.
8677    for ac_exec_ext in '' $ac_executable_extensions; do
8678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8679    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8681    break 2
8682  fi
8683done
8684  done
8685IFS=$as_save_IFS
8686
8687  ;;
8688esac
8689fi
8690MKDIR=$ac_cv_path_MKDIR
8691if test -n "$MKDIR"; then
8692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8693$as_echo "$MKDIR" >&6; }
8694else
8695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8696$as_echo "no" >&6; }
8697fi
8698
8699
8700          if test "x$MKDIR" = x; then
8701            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8702          fi
8703        else
8704          # Otherwise we believe it is a complete path. Use it as it is.
8705          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8706$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8707          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8708$as_echo_n "checking for MKDIR... " >&6; }
8709          if test ! -x "$tool_specified"; then
8710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8711$as_echo "not found" >&6; }
8712            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8713          fi
8714          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8715$as_echo "$tool_specified" >&6; }
8716        fi
8717      fi
8718    fi
8719
8720  fi
8721
8722
8723
8724  if test "x$MKDIR" = x; then
8725    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8726  fi
8727
8728
8729
8730
8731
8732  # Publish this variable in the help.
8733
8734
8735  if [ -z "${MKTEMP+x}" ]; then
8736    # The variable is not set by user, try to locate tool using the code snippet
8737    for ac_prog in mktemp
8738do
8739  # Extract the first word of "$ac_prog", so it can be a program name with args.
8740set dummy $ac_prog; ac_word=$2
8741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8742$as_echo_n "checking for $ac_word... " >&6; }
8743if ${ac_cv_path_MKTEMP+:} false; then :
8744  $as_echo_n "(cached) " >&6
8745else
8746  case $MKTEMP in
8747  [\\/]* | ?:[\\/]*)
8748  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8749  ;;
8750  *)
8751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8752for as_dir in $PATH
8753do
8754  IFS=$as_save_IFS
8755  test -z "$as_dir" && as_dir=.
8756    for ac_exec_ext in '' $ac_executable_extensions; do
8757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8758    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8760    break 2
8761  fi
8762done
8763  done
8764IFS=$as_save_IFS
8765
8766  ;;
8767esac
8768fi
8769MKTEMP=$ac_cv_path_MKTEMP
8770if test -n "$MKTEMP"; then
8771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8772$as_echo "$MKTEMP" >&6; }
8773else
8774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8775$as_echo "no" >&6; }
8776fi
8777
8778
8779  test -n "$MKTEMP" && break
8780done
8781
8782  else
8783    # The variable is set, but is it from the command line or the environment?
8784
8785    # Try to remove the string !MKTEMP! from our list.
8786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8788      # If it failed, the variable was not from the command line. Ignore it,
8789      # but warn the user (except for BASH, which is always set by the calling BASH).
8790      if test "xMKTEMP" != xBASH; then
8791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8792$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8793      fi
8794      # Try to locate tool using the code snippet
8795      for ac_prog in mktemp
8796do
8797  # Extract the first word of "$ac_prog", so it can be a program name with args.
8798set dummy $ac_prog; ac_word=$2
8799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8800$as_echo_n "checking for $ac_word... " >&6; }
8801if ${ac_cv_path_MKTEMP+:} false; then :
8802  $as_echo_n "(cached) " >&6
8803else
8804  case $MKTEMP in
8805  [\\/]* | ?:[\\/]*)
8806  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8807  ;;
8808  *)
8809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8810for as_dir in $PATH
8811do
8812  IFS=$as_save_IFS
8813  test -z "$as_dir" && as_dir=.
8814    for ac_exec_ext in '' $ac_executable_extensions; do
8815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8816    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8818    break 2
8819  fi
8820done
8821  done
8822IFS=$as_save_IFS
8823
8824  ;;
8825esac
8826fi
8827MKTEMP=$ac_cv_path_MKTEMP
8828if test -n "$MKTEMP"; then
8829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8830$as_echo "$MKTEMP" >&6; }
8831else
8832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8833$as_echo "no" >&6; }
8834fi
8835
8836
8837  test -n "$MKTEMP" && break
8838done
8839
8840    else
8841      # If it succeeded, then it was overridden by the user. We will use it
8842      # for the tool.
8843
8844      # First remove it from the list of overridden variables, so we can test
8845      # for unknown variables in the end.
8846      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8847
8848      # Check if we try to supply an empty value
8849      if test "x$MKTEMP" = x; then
8850        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8851$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8852        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8853$as_echo_n "checking for MKTEMP... " >&6; }
8854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8855$as_echo "disabled" >&6; }
8856      else
8857        # Check if the provided tool contains a complete path.
8858        tool_specified="$MKTEMP"
8859        tool_basename="${tool_specified##*/}"
8860        if test "x$tool_basename" = "x$tool_specified"; then
8861          # A command without a complete path is provided, search $PATH.
8862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8863$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8864          # Extract the first word of "$tool_basename", so it can be a program name with args.
8865set dummy $tool_basename; ac_word=$2
8866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8867$as_echo_n "checking for $ac_word... " >&6; }
8868if ${ac_cv_path_MKTEMP+:} false; then :
8869  $as_echo_n "(cached) " >&6
8870else
8871  case $MKTEMP in
8872  [\\/]* | ?:[\\/]*)
8873  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8874  ;;
8875  *)
8876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8877for as_dir in $PATH
8878do
8879  IFS=$as_save_IFS
8880  test -z "$as_dir" && as_dir=.
8881    for ac_exec_ext in '' $ac_executable_extensions; do
8882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8883    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8885    break 2
8886  fi
8887done
8888  done
8889IFS=$as_save_IFS
8890
8891  ;;
8892esac
8893fi
8894MKTEMP=$ac_cv_path_MKTEMP
8895if test -n "$MKTEMP"; then
8896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8897$as_echo "$MKTEMP" >&6; }
8898else
8899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8900$as_echo "no" >&6; }
8901fi
8902
8903
8904          if test "x$MKTEMP" = x; then
8905            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8906          fi
8907        else
8908          # Otherwise we believe it is a complete path. Use it as it is.
8909          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8910$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8911          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8912$as_echo_n "checking for MKTEMP... " >&6; }
8913          if test ! -x "$tool_specified"; then
8914            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8915$as_echo "not found" >&6; }
8916            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8917          fi
8918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8919$as_echo "$tool_specified" >&6; }
8920        fi
8921      fi
8922    fi
8923
8924  fi
8925
8926
8927
8928  if test "x$MKTEMP" = x; then
8929    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8930  fi
8931
8932
8933
8934
8935
8936  # Publish this variable in the help.
8937
8938
8939  if [ -z "${MV+x}" ]; then
8940    # The variable is not set by user, try to locate tool using the code snippet
8941    for ac_prog in mv
8942do
8943  # Extract the first word of "$ac_prog", so it can be a program name with args.
8944set dummy $ac_prog; ac_word=$2
8945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8946$as_echo_n "checking for $ac_word... " >&6; }
8947if ${ac_cv_path_MV+:} false; then :
8948  $as_echo_n "(cached) " >&6
8949else
8950  case $MV in
8951  [\\/]* | ?:[\\/]*)
8952  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8953  ;;
8954  *)
8955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8956for as_dir in $PATH
8957do
8958  IFS=$as_save_IFS
8959  test -z "$as_dir" && as_dir=.
8960    for ac_exec_ext in '' $ac_executable_extensions; do
8961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8962    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8964    break 2
8965  fi
8966done
8967  done
8968IFS=$as_save_IFS
8969
8970  ;;
8971esac
8972fi
8973MV=$ac_cv_path_MV
8974if test -n "$MV"; then
8975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8976$as_echo "$MV" >&6; }
8977else
8978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8979$as_echo "no" >&6; }
8980fi
8981
8982
8983  test -n "$MV" && break
8984done
8985
8986  else
8987    # The variable is set, but is it from the command line or the environment?
8988
8989    # Try to remove the string !MV! from our list.
8990    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8991    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8992      # If it failed, the variable was not from the command line. Ignore it,
8993      # but warn the user (except for BASH, which is always set by the calling BASH).
8994      if test "xMV" != xBASH; then
8995        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8996$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8997      fi
8998      # Try to locate tool using the code snippet
8999      for ac_prog in mv
9000do
9001  # Extract the first word of "$ac_prog", so it can be a program name with args.
9002set dummy $ac_prog; ac_word=$2
9003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9004$as_echo_n "checking for $ac_word... " >&6; }
9005if ${ac_cv_path_MV+:} false; then :
9006  $as_echo_n "(cached) " >&6
9007else
9008  case $MV in
9009  [\\/]* | ?:[\\/]*)
9010  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9011  ;;
9012  *)
9013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9014for as_dir in $PATH
9015do
9016  IFS=$as_save_IFS
9017  test -z "$as_dir" && as_dir=.
9018    for ac_exec_ext in '' $ac_executable_extensions; do
9019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9020    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9022    break 2
9023  fi
9024done
9025  done
9026IFS=$as_save_IFS
9027
9028  ;;
9029esac
9030fi
9031MV=$ac_cv_path_MV
9032if test -n "$MV"; then
9033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9034$as_echo "$MV" >&6; }
9035else
9036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9037$as_echo "no" >&6; }
9038fi
9039
9040
9041  test -n "$MV" && break
9042done
9043
9044    else
9045      # If it succeeded, then it was overridden by the user. We will use it
9046      # for the tool.
9047
9048      # First remove it from the list of overridden variables, so we can test
9049      # for unknown variables in the end.
9050      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9051
9052      # Check if we try to supply an empty value
9053      if test "x$MV" = x; then
9054        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9055$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9057$as_echo_n "checking for MV... " >&6; }
9058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9059$as_echo "disabled" >&6; }
9060      else
9061        # Check if the provided tool contains a complete path.
9062        tool_specified="$MV"
9063        tool_basename="${tool_specified##*/}"
9064        if test "x$tool_basename" = "x$tool_specified"; then
9065          # A command without a complete path is provided, search $PATH.
9066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9067$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9068          # Extract the first word of "$tool_basename", so it can be a program name with args.
9069set dummy $tool_basename; ac_word=$2
9070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9071$as_echo_n "checking for $ac_word... " >&6; }
9072if ${ac_cv_path_MV+:} false; then :
9073  $as_echo_n "(cached) " >&6
9074else
9075  case $MV in
9076  [\\/]* | ?:[\\/]*)
9077  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9078  ;;
9079  *)
9080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9081for as_dir in $PATH
9082do
9083  IFS=$as_save_IFS
9084  test -z "$as_dir" && as_dir=.
9085    for ac_exec_ext in '' $ac_executable_extensions; do
9086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9087    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9089    break 2
9090  fi
9091done
9092  done
9093IFS=$as_save_IFS
9094
9095  ;;
9096esac
9097fi
9098MV=$ac_cv_path_MV
9099if test -n "$MV"; then
9100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9101$as_echo "$MV" >&6; }
9102else
9103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9104$as_echo "no" >&6; }
9105fi
9106
9107
9108          if test "x$MV" = x; then
9109            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9110          fi
9111        else
9112          # Otherwise we believe it is a complete path. Use it as it is.
9113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9114$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9115          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9116$as_echo_n "checking for MV... " >&6; }
9117          if test ! -x "$tool_specified"; then
9118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9119$as_echo "not found" >&6; }
9120            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9121          fi
9122          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9123$as_echo "$tool_specified" >&6; }
9124        fi
9125      fi
9126    fi
9127
9128  fi
9129
9130
9131
9132  if test "x$MV" = x; then
9133    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9134  fi
9135
9136
9137
9138
9139
9140  # Publish this variable in the help.
9141
9142
9143  if [ -z "${NAWK+x}" ]; then
9144    # The variable is not set by user, try to locate tool using the code snippet
9145    for ac_prog in nawk gawk awk
9146do
9147  # Extract the first word of "$ac_prog", so it can be a program name with args.
9148set dummy $ac_prog; ac_word=$2
9149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9150$as_echo_n "checking for $ac_word... " >&6; }
9151if ${ac_cv_path_NAWK+:} false; then :
9152  $as_echo_n "(cached) " >&6
9153else
9154  case $NAWK in
9155  [\\/]* | ?:[\\/]*)
9156  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9157  ;;
9158  *)
9159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9160for as_dir in $PATH
9161do
9162  IFS=$as_save_IFS
9163  test -z "$as_dir" && as_dir=.
9164    for ac_exec_ext in '' $ac_executable_extensions; do
9165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9166    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9168    break 2
9169  fi
9170done
9171  done
9172IFS=$as_save_IFS
9173
9174  ;;
9175esac
9176fi
9177NAWK=$ac_cv_path_NAWK
9178if test -n "$NAWK"; then
9179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9180$as_echo "$NAWK" >&6; }
9181else
9182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9183$as_echo "no" >&6; }
9184fi
9185
9186
9187  test -n "$NAWK" && break
9188done
9189
9190  else
9191    # The variable is set, but is it from the command line or the environment?
9192
9193    # Try to remove the string !NAWK! from our list.
9194    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9195    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9196      # If it failed, the variable was not from the command line. Ignore it,
9197      # but warn the user (except for BASH, which is always set by the calling BASH).
9198      if test "xNAWK" != xBASH; then
9199        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9200$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9201      fi
9202      # Try to locate tool using the code snippet
9203      for ac_prog in nawk gawk awk
9204do
9205  # Extract the first word of "$ac_prog", so it can be a program name with args.
9206set dummy $ac_prog; ac_word=$2
9207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9208$as_echo_n "checking for $ac_word... " >&6; }
9209if ${ac_cv_path_NAWK+:} false; then :
9210  $as_echo_n "(cached) " >&6
9211else
9212  case $NAWK in
9213  [\\/]* | ?:[\\/]*)
9214  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9215  ;;
9216  *)
9217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9218for as_dir in $PATH
9219do
9220  IFS=$as_save_IFS
9221  test -z "$as_dir" && as_dir=.
9222    for ac_exec_ext in '' $ac_executable_extensions; do
9223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9224    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9226    break 2
9227  fi
9228done
9229  done
9230IFS=$as_save_IFS
9231
9232  ;;
9233esac
9234fi
9235NAWK=$ac_cv_path_NAWK
9236if test -n "$NAWK"; then
9237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9238$as_echo "$NAWK" >&6; }
9239else
9240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9241$as_echo "no" >&6; }
9242fi
9243
9244
9245  test -n "$NAWK" && break
9246done
9247
9248    else
9249      # If it succeeded, then it was overridden by the user. We will use it
9250      # for the tool.
9251
9252      # First remove it from the list of overridden variables, so we can test
9253      # for unknown variables in the end.
9254      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9255
9256      # Check if we try to supply an empty value
9257      if test "x$NAWK" = x; then
9258        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9259$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9261$as_echo_n "checking for NAWK... " >&6; }
9262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9263$as_echo "disabled" >&6; }
9264      else
9265        # Check if the provided tool contains a complete path.
9266        tool_specified="$NAWK"
9267        tool_basename="${tool_specified##*/}"
9268        if test "x$tool_basename" = "x$tool_specified"; then
9269          # A command without a complete path is provided, search $PATH.
9270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9271$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9272          # Extract the first word of "$tool_basename", so it can be a program name with args.
9273set dummy $tool_basename; ac_word=$2
9274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9275$as_echo_n "checking for $ac_word... " >&6; }
9276if ${ac_cv_path_NAWK+:} false; then :
9277  $as_echo_n "(cached) " >&6
9278else
9279  case $NAWK in
9280  [\\/]* | ?:[\\/]*)
9281  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9282  ;;
9283  *)
9284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9285for as_dir in $PATH
9286do
9287  IFS=$as_save_IFS
9288  test -z "$as_dir" && as_dir=.
9289    for ac_exec_ext in '' $ac_executable_extensions; do
9290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9291    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9293    break 2
9294  fi
9295done
9296  done
9297IFS=$as_save_IFS
9298
9299  ;;
9300esac
9301fi
9302NAWK=$ac_cv_path_NAWK
9303if test -n "$NAWK"; then
9304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9305$as_echo "$NAWK" >&6; }
9306else
9307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9308$as_echo "no" >&6; }
9309fi
9310
9311
9312          if test "x$NAWK" = x; then
9313            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9314          fi
9315        else
9316          # Otherwise we believe it is a complete path. Use it as it is.
9317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9318$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9319          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9320$as_echo_n "checking for NAWK... " >&6; }
9321          if test ! -x "$tool_specified"; then
9322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9323$as_echo "not found" >&6; }
9324            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9325          fi
9326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9327$as_echo "$tool_specified" >&6; }
9328        fi
9329      fi
9330    fi
9331
9332  fi
9333
9334
9335
9336  if test "x$NAWK" = x; then
9337    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9338  fi
9339
9340
9341
9342
9343
9344  # Publish this variable in the help.
9345
9346
9347  if [ -z "${PRINTF+x}" ]; then
9348    # The variable is not set by user, try to locate tool using the code snippet
9349    for ac_prog in printf
9350do
9351  # Extract the first word of "$ac_prog", so it can be a program name with args.
9352set dummy $ac_prog; ac_word=$2
9353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9354$as_echo_n "checking for $ac_word... " >&6; }
9355if ${ac_cv_path_PRINTF+:} false; then :
9356  $as_echo_n "(cached) " >&6
9357else
9358  case $PRINTF in
9359  [\\/]* | ?:[\\/]*)
9360  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9361  ;;
9362  *)
9363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9364for as_dir in $PATH
9365do
9366  IFS=$as_save_IFS
9367  test -z "$as_dir" && as_dir=.
9368    for ac_exec_ext in '' $ac_executable_extensions; do
9369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9370    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9372    break 2
9373  fi
9374done
9375  done
9376IFS=$as_save_IFS
9377
9378  ;;
9379esac
9380fi
9381PRINTF=$ac_cv_path_PRINTF
9382if test -n "$PRINTF"; then
9383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9384$as_echo "$PRINTF" >&6; }
9385else
9386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9387$as_echo "no" >&6; }
9388fi
9389
9390
9391  test -n "$PRINTF" && break
9392done
9393
9394  else
9395    # The variable is set, but is it from the command line or the environment?
9396
9397    # Try to remove the string !PRINTF! from our list.
9398    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9399    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9400      # If it failed, the variable was not from the command line. Ignore it,
9401      # but warn the user (except for BASH, which is always set by the calling BASH).
9402      if test "xPRINTF" != xBASH; then
9403        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9404$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9405      fi
9406      # Try to locate tool using the code snippet
9407      for ac_prog in printf
9408do
9409  # Extract the first word of "$ac_prog", so it can be a program name with args.
9410set dummy $ac_prog; ac_word=$2
9411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9412$as_echo_n "checking for $ac_word... " >&6; }
9413if ${ac_cv_path_PRINTF+:} false; then :
9414  $as_echo_n "(cached) " >&6
9415else
9416  case $PRINTF in
9417  [\\/]* | ?:[\\/]*)
9418  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9419  ;;
9420  *)
9421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9422for as_dir in $PATH
9423do
9424  IFS=$as_save_IFS
9425  test -z "$as_dir" && as_dir=.
9426    for ac_exec_ext in '' $ac_executable_extensions; do
9427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9428    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9430    break 2
9431  fi
9432done
9433  done
9434IFS=$as_save_IFS
9435
9436  ;;
9437esac
9438fi
9439PRINTF=$ac_cv_path_PRINTF
9440if test -n "$PRINTF"; then
9441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9442$as_echo "$PRINTF" >&6; }
9443else
9444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9445$as_echo "no" >&6; }
9446fi
9447
9448
9449  test -n "$PRINTF" && break
9450done
9451
9452    else
9453      # If it succeeded, then it was overridden by the user. We will use it
9454      # for the tool.
9455
9456      # First remove it from the list of overridden variables, so we can test
9457      # for unknown variables in the end.
9458      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9459
9460      # Check if we try to supply an empty value
9461      if test "x$PRINTF" = x; then
9462        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9463$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9464        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9465$as_echo_n "checking for PRINTF... " >&6; }
9466        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9467$as_echo "disabled" >&6; }
9468      else
9469        # Check if the provided tool contains a complete path.
9470        tool_specified="$PRINTF"
9471        tool_basename="${tool_specified##*/}"
9472        if test "x$tool_basename" = "x$tool_specified"; then
9473          # A command without a complete path is provided, search $PATH.
9474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9475$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9476          # Extract the first word of "$tool_basename", so it can be a program name with args.
9477set dummy $tool_basename; ac_word=$2
9478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9479$as_echo_n "checking for $ac_word... " >&6; }
9480if ${ac_cv_path_PRINTF+:} false; then :
9481  $as_echo_n "(cached) " >&6
9482else
9483  case $PRINTF in
9484  [\\/]* | ?:[\\/]*)
9485  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9486  ;;
9487  *)
9488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9489for as_dir in $PATH
9490do
9491  IFS=$as_save_IFS
9492  test -z "$as_dir" && as_dir=.
9493    for ac_exec_ext in '' $ac_executable_extensions; do
9494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9495    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9497    break 2
9498  fi
9499done
9500  done
9501IFS=$as_save_IFS
9502
9503  ;;
9504esac
9505fi
9506PRINTF=$ac_cv_path_PRINTF
9507if test -n "$PRINTF"; then
9508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9509$as_echo "$PRINTF" >&6; }
9510else
9511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9512$as_echo "no" >&6; }
9513fi
9514
9515
9516          if test "x$PRINTF" = x; then
9517            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9518          fi
9519        else
9520          # Otherwise we believe it is a complete path. Use it as it is.
9521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9522$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9523          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9524$as_echo_n "checking for PRINTF... " >&6; }
9525          if test ! -x "$tool_specified"; then
9526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9527$as_echo "not found" >&6; }
9528            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9529          fi
9530          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9531$as_echo "$tool_specified" >&6; }
9532        fi
9533      fi
9534    fi
9535
9536  fi
9537
9538
9539
9540  if test "x$PRINTF" = x; then
9541    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9542  fi
9543
9544
9545
9546
9547
9548  # Publish this variable in the help.
9549
9550
9551  if [ -z "${RM+x}" ]; then
9552    # The variable is not set by user, try to locate tool using the code snippet
9553    for ac_prog in rm
9554do
9555  # Extract the first word of "$ac_prog", so it can be a program name with args.
9556set dummy $ac_prog; ac_word=$2
9557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9558$as_echo_n "checking for $ac_word... " >&6; }
9559if ${ac_cv_path_RM+:} false; then :
9560  $as_echo_n "(cached) " >&6
9561else
9562  case $RM in
9563  [\\/]* | ?:[\\/]*)
9564  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9565  ;;
9566  *)
9567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9568for as_dir in $PATH
9569do
9570  IFS=$as_save_IFS
9571  test -z "$as_dir" && as_dir=.
9572    for ac_exec_ext in '' $ac_executable_extensions; do
9573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9574    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9576    break 2
9577  fi
9578done
9579  done
9580IFS=$as_save_IFS
9581
9582  ;;
9583esac
9584fi
9585RM=$ac_cv_path_RM
9586if test -n "$RM"; then
9587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9588$as_echo "$RM" >&6; }
9589else
9590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9591$as_echo "no" >&6; }
9592fi
9593
9594
9595  test -n "$RM" && break
9596done
9597
9598  else
9599    # The variable is set, but is it from the command line or the environment?
9600
9601    # Try to remove the string !RM! from our list.
9602    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9603    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9604      # If it failed, the variable was not from the command line. Ignore it,
9605      # but warn the user (except for BASH, which is always set by the calling BASH).
9606      if test "xRM" != xBASH; then
9607        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9608$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9609      fi
9610      # Try to locate tool using the code snippet
9611      for ac_prog in rm
9612do
9613  # Extract the first word of "$ac_prog", so it can be a program name with args.
9614set dummy $ac_prog; ac_word=$2
9615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9616$as_echo_n "checking for $ac_word... " >&6; }
9617if ${ac_cv_path_RM+:} false; then :
9618  $as_echo_n "(cached) " >&6
9619else
9620  case $RM in
9621  [\\/]* | ?:[\\/]*)
9622  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9623  ;;
9624  *)
9625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9626for as_dir in $PATH
9627do
9628  IFS=$as_save_IFS
9629  test -z "$as_dir" && as_dir=.
9630    for ac_exec_ext in '' $ac_executable_extensions; do
9631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9632    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9634    break 2
9635  fi
9636done
9637  done
9638IFS=$as_save_IFS
9639
9640  ;;
9641esac
9642fi
9643RM=$ac_cv_path_RM
9644if test -n "$RM"; then
9645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9646$as_echo "$RM" >&6; }
9647else
9648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9649$as_echo "no" >&6; }
9650fi
9651
9652
9653  test -n "$RM" && break
9654done
9655
9656    else
9657      # If it succeeded, then it was overridden by the user. We will use it
9658      # for the tool.
9659
9660      # First remove it from the list of overridden variables, so we can test
9661      # for unknown variables in the end.
9662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9663
9664      # Check if we try to supply an empty value
9665      if test "x$RM" = x; then
9666        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9667$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9669$as_echo_n "checking for RM... " >&6; }
9670        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9671$as_echo "disabled" >&6; }
9672      else
9673        # Check if the provided tool contains a complete path.
9674        tool_specified="$RM"
9675        tool_basename="${tool_specified##*/}"
9676        if test "x$tool_basename" = "x$tool_specified"; then
9677          # A command without a complete path is provided, search $PATH.
9678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9679$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9680          # Extract the first word of "$tool_basename", so it can be a program name with args.
9681set dummy $tool_basename; ac_word=$2
9682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9683$as_echo_n "checking for $ac_word... " >&6; }
9684if ${ac_cv_path_RM+:} false; then :
9685  $as_echo_n "(cached) " >&6
9686else
9687  case $RM in
9688  [\\/]* | ?:[\\/]*)
9689  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9690  ;;
9691  *)
9692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9693for as_dir in $PATH
9694do
9695  IFS=$as_save_IFS
9696  test -z "$as_dir" && as_dir=.
9697    for ac_exec_ext in '' $ac_executable_extensions; do
9698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9699    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9701    break 2
9702  fi
9703done
9704  done
9705IFS=$as_save_IFS
9706
9707  ;;
9708esac
9709fi
9710RM=$ac_cv_path_RM
9711if test -n "$RM"; then
9712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9713$as_echo "$RM" >&6; }
9714else
9715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9716$as_echo "no" >&6; }
9717fi
9718
9719
9720          if test "x$RM" = x; then
9721            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9722          fi
9723        else
9724          # Otherwise we believe it is a complete path. Use it as it is.
9725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9726$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9727          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9728$as_echo_n "checking for RM... " >&6; }
9729          if test ! -x "$tool_specified"; then
9730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9731$as_echo "not found" >&6; }
9732            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9733          fi
9734          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9735$as_echo "$tool_specified" >&6; }
9736        fi
9737      fi
9738    fi
9739
9740  fi
9741
9742
9743
9744  if test "x$RM" = x; then
9745    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9746  fi
9747
9748
9749
9750
9751
9752  # Publish this variable in the help.
9753
9754
9755  if [ -z "${RMDIR+x}" ]; then
9756    # The variable is not set by user, try to locate tool using the code snippet
9757    for ac_prog in rmdir
9758do
9759  # Extract the first word of "$ac_prog", so it can be a program name with args.
9760set dummy $ac_prog; ac_word=$2
9761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9762$as_echo_n "checking for $ac_word... " >&6; }
9763if ${ac_cv_path_RMDIR+:} false; then :
9764  $as_echo_n "(cached) " >&6
9765else
9766  case $RMDIR in
9767  [\\/]* | ?:[\\/]*)
9768  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9769  ;;
9770  *)
9771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9772for as_dir in $PATH
9773do
9774  IFS=$as_save_IFS
9775  test -z "$as_dir" && as_dir=.
9776    for ac_exec_ext in '' $ac_executable_extensions; do
9777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9778    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9780    break 2
9781  fi
9782done
9783  done
9784IFS=$as_save_IFS
9785
9786  ;;
9787esac
9788fi
9789RMDIR=$ac_cv_path_RMDIR
9790if test -n "$RMDIR"; then
9791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9792$as_echo "$RMDIR" >&6; }
9793else
9794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9795$as_echo "no" >&6; }
9796fi
9797
9798
9799  test -n "$RMDIR" && break
9800done
9801
9802  else
9803    # The variable is set, but is it from the command line or the environment?
9804
9805    # Try to remove the string !RMDIR! from our list.
9806    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9807    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9808      # If it failed, the variable was not from the command line. Ignore it,
9809      # but warn the user (except for BASH, which is always set by the calling BASH).
9810      if test "xRMDIR" != xBASH; then
9811        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9812$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9813      fi
9814      # Try to locate tool using the code snippet
9815      for ac_prog in rmdir
9816do
9817  # Extract the first word of "$ac_prog", so it can be a program name with args.
9818set dummy $ac_prog; ac_word=$2
9819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9820$as_echo_n "checking for $ac_word... " >&6; }
9821if ${ac_cv_path_RMDIR+:} false; then :
9822  $as_echo_n "(cached) " >&6
9823else
9824  case $RMDIR in
9825  [\\/]* | ?:[\\/]*)
9826  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9827  ;;
9828  *)
9829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9830for as_dir in $PATH
9831do
9832  IFS=$as_save_IFS
9833  test -z "$as_dir" && as_dir=.
9834    for ac_exec_ext in '' $ac_executable_extensions; do
9835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9836    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9838    break 2
9839  fi
9840done
9841  done
9842IFS=$as_save_IFS
9843
9844  ;;
9845esac
9846fi
9847RMDIR=$ac_cv_path_RMDIR
9848if test -n "$RMDIR"; then
9849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9850$as_echo "$RMDIR" >&6; }
9851else
9852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9853$as_echo "no" >&6; }
9854fi
9855
9856
9857  test -n "$RMDIR" && break
9858done
9859
9860    else
9861      # If it succeeded, then it was overridden by the user. We will use it
9862      # for the tool.
9863
9864      # First remove it from the list of overridden variables, so we can test
9865      # for unknown variables in the end.
9866      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9867
9868      # Check if we try to supply an empty value
9869      if test "x$RMDIR" = x; then
9870        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9871$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9872        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9873$as_echo_n "checking for RMDIR... " >&6; }
9874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9875$as_echo "disabled" >&6; }
9876      else
9877        # Check if the provided tool contains a complete path.
9878        tool_specified="$RMDIR"
9879        tool_basename="${tool_specified##*/}"
9880        if test "x$tool_basename" = "x$tool_specified"; then
9881          # A command without a complete path is provided, search $PATH.
9882          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9883$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9884          # Extract the first word of "$tool_basename", so it can be a program name with args.
9885set dummy $tool_basename; ac_word=$2
9886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9887$as_echo_n "checking for $ac_word... " >&6; }
9888if ${ac_cv_path_RMDIR+:} false; then :
9889  $as_echo_n "(cached) " >&6
9890else
9891  case $RMDIR in
9892  [\\/]* | ?:[\\/]*)
9893  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9894  ;;
9895  *)
9896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9897for as_dir in $PATH
9898do
9899  IFS=$as_save_IFS
9900  test -z "$as_dir" && as_dir=.
9901    for ac_exec_ext in '' $ac_executable_extensions; do
9902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9903    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9905    break 2
9906  fi
9907done
9908  done
9909IFS=$as_save_IFS
9910
9911  ;;
9912esac
9913fi
9914RMDIR=$ac_cv_path_RMDIR
9915if test -n "$RMDIR"; then
9916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9917$as_echo "$RMDIR" >&6; }
9918else
9919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9920$as_echo "no" >&6; }
9921fi
9922
9923
9924          if test "x$RMDIR" = x; then
9925            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9926          fi
9927        else
9928          # Otherwise we believe it is a complete path. Use it as it is.
9929          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9930$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9931          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9932$as_echo_n "checking for RMDIR... " >&6; }
9933          if test ! -x "$tool_specified"; then
9934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9935$as_echo "not found" >&6; }
9936            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9937          fi
9938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9939$as_echo "$tool_specified" >&6; }
9940        fi
9941      fi
9942    fi
9943
9944  fi
9945
9946
9947
9948  if test "x$RMDIR" = x; then
9949    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9950  fi
9951
9952
9953
9954
9955
9956  # Publish this variable in the help.
9957
9958
9959  if [ -z "${SH+x}" ]; then
9960    # The variable is not set by user, try to locate tool using the code snippet
9961    for ac_prog in sh
9962do
9963  # Extract the first word of "$ac_prog", so it can be a program name with args.
9964set dummy $ac_prog; ac_word=$2
9965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9966$as_echo_n "checking for $ac_word... " >&6; }
9967if ${ac_cv_path_SH+:} false; then :
9968  $as_echo_n "(cached) " >&6
9969else
9970  case $SH in
9971  [\\/]* | ?:[\\/]*)
9972  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9973  ;;
9974  *)
9975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9976for as_dir in $PATH
9977do
9978  IFS=$as_save_IFS
9979  test -z "$as_dir" && as_dir=.
9980    for ac_exec_ext in '' $ac_executable_extensions; do
9981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9982    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9984    break 2
9985  fi
9986done
9987  done
9988IFS=$as_save_IFS
9989
9990  ;;
9991esac
9992fi
9993SH=$ac_cv_path_SH
9994if test -n "$SH"; then
9995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9996$as_echo "$SH" >&6; }
9997else
9998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9999$as_echo "no" >&6; }
10000fi
10001
10002
10003  test -n "$SH" && break
10004done
10005
10006  else
10007    # The variable is set, but is it from the command line or the environment?
10008
10009    # Try to remove the string !SH! from our list.
10010    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10011    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10012      # If it failed, the variable was not from the command line. Ignore it,
10013      # but warn the user (except for BASH, which is always set by the calling BASH).
10014      if test "xSH" != xBASH; then
10015        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10016$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10017      fi
10018      # Try to locate tool using the code snippet
10019      for ac_prog in sh
10020do
10021  # Extract the first word of "$ac_prog", so it can be a program name with args.
10022set dummy $ac_prog; ac_word=$2
10023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10024$as_echo_n "checking for $ac_word... " >&6; }
10025if ${ac_cv_path_SH+:} false; then :
10026  $as_echo_n "(cached) " >&6
10027else
10028  case $SH in
10029  [\\/]* | ?:[\\/]*)
10030  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10031  ;;
10032  *)
10033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10034for as_dir in $PATH
10035do
10036  IFS=$as_save_IFS
10037  test -z "$as_dir" && as_dir=.
10038    for ac_exec_ext in '' $ac_executable_extensions; do
10039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10040    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10042    break 2
10043  fi
10044done
10045  done
10046IFS=$as_save_IFS
10047
10048  ;;
10049esac
10050fi
10051SH=$ac_cv_path_SH
10052if test -n "$SH"; then
10053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10054$as_echo "$SH" >&6; }
10055else
10056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10057$as_echo "no" >&6; }
10058fi
10059
10060
10061  test -n "$SH" && break
10062done
10063
10064    else
10065      # If it succeeded, then it was overridden by the user. We will use it
10066      # for the tool.
10067
10068      # First remove it from the list of overridden variables, so we can test
10069      # for unknown variables in the end.
10070      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10071
10072      # Check if we try to supply an empty value
10073      if test "x$SH" = x; then
10074        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10075$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10077$as_echo_n "checking for SH... " >&6; }
10078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10079$as_echo "disabled" >&6; }
10080      else
10081        # Check if the provided tool contains a complete path.
10082        tool_specified="$SH"
10083        tool_basename="${tool_specified##*/}"
10084        if test "x$tool_basename" = "x$tool_specified"; then
10085          # A command without a complete path is provided, search $PATH.
10086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10087$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10088          # Extract the first word of "$tool_basename", so it can be a program name with args.
10089set dummy $tool_basename; ac_word=$2
10090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10091$as_echo_n "checking for $ac_word... " >&6; }
10092if ${ac_cv_path_SH+:} false; then :
10093  $as_echo_n "(cached) " >&6
10094else
10095  case $SH in
10096  [\\/]* | ?:[\\/]*)
10097  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10098  ;;
10099  *)
10100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10101for as_dir in $PATH
10102do
10103  IFS=$as_save_IFS
10104  test -z "$as_dir" && as_dir=.
10105    for ac_exec_ext in '' $ac_executable_extensions; do
10106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10107    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10109    break 2
10110  fi
10111done
10112  done
10113IFS=$as_save_IFS
10114
10115  ;;
10116esac
10117fi
10118SH=$ac_cv_path_SH
10119if test -n "$SH"; then
10120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10121$as_echo "$SH" >&6; }
10122else
10123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10124$as_echo "no" >&6; }
10125fi
10126
10127
10128          if test "x$SH" = x; then
10129            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10130          fi
10131        else
10132          # Otherwise we believe it is a complete path. Use it as it is.
10133          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10134$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10135          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10136$as_echo_n "checking for SH... " >&6; }
10137          if test ! -x "$tool_specified"; then
10138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10139$as_echo "not found" >&6; }
10140            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10141          fi
10142          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10143$as_echo "$tool_specified" >&6; }
10144        fi
10145      fi
10146    fi
10147
10148  fi
10149
10150
10151
10152  if test "x$SH" = x; then
10153    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10154  fi
10155
10156
10157
10158
10159
10160  # Publish this variable in the help.
10161
10162
10163  if [ -z "${SORT+x}" ]; then
10164    # The variable is not set by user, try to locate tool using the code snippet
10165    for ac_prog in sort
10166do
10167  # Extract the first word of "$ac_prog", so it can be a program name with args.
10168set dummy $ac_prog; ac_word=$2
10169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10170$as_echo_n "checking for $ac_word... " >&6; }
10171if ${ac_cv_path_SORT+:} false; then :
10172  $as_echo_n "(cached) " >&6
10173else
10174  case $SORT in
10175  [\\/]* | ?:[\\/]*)
10176  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10177  ;;
10178  *)
10179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10180for as_dir in $PATH
10181do
10182  IFS=$as_save_IFS
10183  test -z "$as_dir" && as_dir=.
10184    for ac_exec_ext in '' $ac_executable_extensions; do
10185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10186    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10188    break 2
10189  fi
10190done
10191  done
10192IFS=$as_save_IFS
10193
10194  ;;
10195esac
10196fi
10197SORT=$ac_cv_path_SORT
10198if test -n "$SORT"; then
10199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10200$as_echo "$SORT" >&6; }
10201else
10202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10203$as_echo "no" >&6; }
10204fi
10205
10206
10207  test -n "$SORT" && break
10208done
10209
10210  else
10211    # The variable is set, but is it from the command line or the environment?
10212
10213    # Try to remove the string !SORT! from our list.
10214    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10215    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10216      # If it failed, the variable was not from the command line. Ignore it,
10217      # but warn the user (except for BASH, which is always set by the calling BASH).
10218      if test "xSORT" != xBASH; then
10219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10220$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10221      fi
10222      # Try to locate tool using the code snippet
10223      for ac_prog in sort
10224do
10225  # Extract the first word of "$ac_prog", so it can be a program name with args.
10226set dummy $ac_prog; ac_word=$2
10227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10228$as_echo_n "checking for $ac_word... " >&6; }
10229if ${ac_cv_path_SORT+:} false; then :
10230  $as_echo_n "(cached) " >&6
10231else
10232  case $SORT in
10233  [\\/]* | ?:[\\/]*)
10234  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10235  ;;
10236  *)
10237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10238for as_dir in $PATH
10239do
10240  IFS=$as_save_IFS
10241  test -z "$as_dir" && as_dir=.
10242    for ac_exec_ext in '' $ac_executable_extensions; do
10243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10244    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10246    break 2
10247  fi
10248done
10249  done
10250IFS=$as_save_IFS
10251
10252  ;;
10253esac
10254fi
10255SORT=$ac_cv_path_SORT
10256if test -n "$SORT"; then
10257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10258$as_echo "$SORT" >&6; }
10259else
10260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10261$as_echo "no" >&6; }
10262fi
10263
10264
10265  test -n "$SORT" && break
10266done
10267
10268    else
10269      # If it succeeded, then it was overridden by the user. We will use it
10270      # for the tool.
10271
10272      # First remove it from the list of overridden variables, so we can test
10273      # for unknown variables in the end.
10274      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10275
10276      # Check if we try to supply an empty value
10277      if test "x$SORT" = x; then
10278        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10279$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10280        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10281$as_echo_n "checking for SORT... " >&6; }
10282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10283$as_echo "disabled" >&6; }
10284      else
10285        # Check if the provided tool contains a complete path.
10286        tool_specified="$SORT"
10287        tool_basename="${tool_specified##*/}"
10288        if test "x$tool_basename" = "x$tool_specified"; then
10289          # A command without a complete path is provided, search $PATH.
10290          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10291$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10292          # Extract the first word of "$tool_basename", so it can be a program name with args.
10293set dummy $tool_basename; ac_word=$2
10294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10295$as_echo_n "checking for $ac_word... " >&6; }
10296if ${ac_cv_path_SORT+:} false; then :
10297  $as_echo_n "(cached) " >&6
10298else
10299  case $SORT in
10300  [\\/]* | ?:[\\/]*)
10301  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10302  ;;
10303  *)
10304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10305for as_dir in $PATH
10306do
10307  IFS=$as_save_IFS
10308  test -z "$as_dir" && as_dir=.
10309    for ac_exec_ext in '' $ac_executable_extensions; do
10310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10311    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10313    break 2
10314  fi
10315done
10316  done
10317IFS=$as_save_IFS
10318
10319  ;;
10320esac
10321fi
10322SORT=$ac_cv_path_SORT
10323if test -n "$SORT"; then
10324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10325$as_echo "$SORT" >&6; }
10326else
10327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10328$as_echo "no" >&6; }
10329fi
10330
10331
10332          if test "x$SORT" = x; then
10333            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10334          fi
10335        else
10336          # Otherwise we believe it is a complete path. Use it as it is.
10337          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10338$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10339          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10340$as_echo_n "checking for SORT... " >&6; }
10341          if test ! -x "$tool_specified"; then
10342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10343$as_echo "not found" >&6; }
10344            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10345          fi
10346          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10347$as_echo "$tool_specified" >&6; }
10348        fi
10349      fi
10350    fi
10351
10352  fi
10353
10354
10355
10356  if test "x$SORT" = x; then
10357    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10358  fi
10359
10360
10361
10362
10363
10364  # Publish this variable in the help.
10365
10366
10367  if [ -z "${TAIL+x}" ]; then
10368    # The variable is not set by user, try to locate tool using the code snippet
10369    for ac_prog in tail
10370do
10371  # Extract the first word of "$ac_prog", so it can be a program name with args.
10372set dummy $ac_prog; ac_word=$2
10373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10374$as_echo_n "checking for $ac_word... " >&6; }
10375if ${ac_cv_path_TAIL+:} false; then :
10376  $as_echo_n "(cached) " >&6
10377else
10378  case $TAIL in
10379  [\\/]* | ?:[\\/]*)
10380  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10381  ;;
10382  *)
10383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10384for as_dir in $PATH
10385do
10386  IFS=$as_save_IFS
10387  test -z "$as_dir" && as_dir=.
10388    for ac_exec_ext in '' $ac_executable_extensions; do
10389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10390    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10392    break 2
10393  fi
10394done
10395  done
10396IFS=$as_save_IFS
10397
10398  ;;
10399esac
10400fi
10401TAIL=$ac_cv_path_TAIL
10402if test -n "$TAIL"; then
10403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10404$as_echo "$TAIL" >&6; }
10405else
10406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10407$as_echo "no" >&6; }
10408fi
10409
10410
10411  test -n "$TAIL" && break
10412done
10413
10414  else
10415    # The variable is set, but is it from the command line or the environment?
10416
10417    # Try to remove the string !TAIL! from our list.
10418    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10419    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10420      # If it failed, the variable was not from the command line. Ignore it,
10421      # but warn the user (except for BASH, which is always set by the calling BASH).
10422      if test "xTAIL" != xBASH; then
10423        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10424$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10425      fi
10426      # Try to locate tool using the code snippet
10427      for ac_prog in tail
10428do
10429  # Extract the first word of "$ac_prog", so it can be a program name with args.
10430set dummy $ac_prog; ac_word=$2
10431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10432$as_echo_n "checking for $ac_word... " >&6; }
10433if ${ac_cv_path_TAIL+:} false; then :
10434  $as_echo_n "(cached) " >&6
10435else
10436  case $TAIL in
10437  [\\/]* | ?:[\\/]*)
10438  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10439  ;;
10440  *)
10441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10442for as_dir in $PATH
10443do
10444  IFS=$as_save_IFS
10445  test -z "$as_dir" && as_dir=.
10446    for ac_exec_ext in '' $ac_executable_extensions; do
10447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10448    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10450    break 2
10451  fi
10452done
10453  done
10454IFS=$as_save_IFS
10455
10456  ;;
10457esac
10458fi
10459TAIL=$ac_cv_path_TAIL
10460if test -n "$TAIL"; then
10461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10462$as_echo "$TAIL" >&6; }
10463else
10464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10465$as_echo "no" >&6; }
10466fi
10467
10468
10469  test -n "$TAIL" && break
10470done
10471
10472    else
10473      # If it succeeded, then it was overridden by the user. We will use it
10474      # for the tool.
10475
10476      # First remove it from the list of overridden variables, so we can test
10477      # for unknown variables in the end.
10478      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10479
10480      # Check if we try to supply an empty value
10481      if test "x$TAIL" = x; then
10482        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10483$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10484        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10485$as_echo_n "checking for TAIL... " >&6; }
10486        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10487$as_echo "disabled" >&6; }
10488      else
10489        # Check if the provided tool contains a complete path.
10490        tool_specified="$TAIL"
10491        tool_basename="${tool_specified##*/}"
10492        if test "x$tool_basename" = "x$tool_specified"; then
10493          # A command without a complete path is provided, search $PATH.
10494          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10495$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10496          # Extract the first word of "$tool_basename", so it can be a program name with args.
10497set dummy $tool_basename; ac_word=$2
10498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10499$as_echo_n "checking for $ac_word... " >&6; }
10500if ${ac_cv_path_TAIL+:} false; then :
10501  $as_echo_n "(cached) " >&6
10502else
10503  case $TAIL in
10504  [\\/]* | ?:[\\/]*)
10505  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10506  ;;
10507  *)
10508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10509for as_dir in $PATH
10510do
10511  IFS=$as_save_IFS
10512  test -z "$as_dir" && as_dir=.
10513    for ac_exec_ext in '' $ac_executable_extensions; do
10514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10515    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10517    break 2
10518  fi
10519done
10520  done
10521IFS=$as_save_IFS
10522
10523  ;;
10524esac
10525fi
10526TAIL=$ac_cv_path_TAIL
10527if test -n "$TAIL"; then
10528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10529$as_echo "$TAIL" >&6; }
10530else
10531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10532$as_echo "no" >&6; }
10533fi
10534
10535
10536          if test "x$TAIL" = x; then
10537            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10538          fi
10539        else
10540          # Otherwise we believe it is a complete path. Use it as it is.
10541          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10542$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10543          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10544$as_echo_n "checking for TAIL... " >&6; }
10545          if test ! -x "$tool_specified"; then
10546            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10547$as_echo "not found" >&6; }
10548            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10549          fi
10550          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10551$as_echo "$tool_specified" >&6; }
10552        fi
10553      fi
10554    fi
10555
10556  fi
10557
10558
10559
10560  if test "x$TAIL" = x; then
10561    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10562  fi
10563
10564
10565
10566
10567
10568  # Publish this variable in the help.
10569
10570
10571  if [ -z "${TAR+x}" ]; then
10572    # The variable is not set by user, try to locate tool using the code snippet
10573    for ac_prog in tar
10574do
10575  # Extract the first word of "$ac_prog", so it can be a program name with args.
10576set dummy $ac_prog; ac_word=$2
10577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10578$as_echo_n "checking for $ac_word... " >&6; }
10579if ${ac_cv_path_TAR+:} false; then :
10580  $as_echo_n "(cached) " >&6
10581else
10582  case $TAR in
10583  [\\/]* | ?:[\\/]*)
10584  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10585  ;;
10586  *)
10587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10588for as_dir in $PATH
10589do
10590  IFS=$as_save_IFS
10591  test -z "$as_dir" && as_dir=.
10592    for ac_exec_ext in '' $ac_executable_extensions; do
10593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10594    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10596    break 2
10597  fi
10598done
10599  done
10600IFS=$as_save_IFS
10601
10602  ;;
10603esac
10604fi
10605TAR=$ac_cv_path_TAR
10606if test -n "$TAR"; then
10607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10608$as_echo "$TAR" >&6; }
10609else
10610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10611$as_echo "no" >&6; }
10612fi
10613
10614
10615  test -n "$TAR" && break
10616done
10617
10618  else
10619    # The variable is set, but is it from the command line or the environment?
10620
10621    # Try to remove the string !TAR! from our list.
10622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10624      # If it failed, the variable was not from the command line. Ignore it,
10625      # but warn the user (except for BASH, which is always set by the calling BASH).
10626      if test "xTAR" != xBASH; then
10627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10628$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10629      fi
10630      # Try to locate tool using the code snippet
10631      for ac_prog in tar
10632do
10633  # Extract the first word of "$ac_prog", so it can be a program name with args.
10634set dummy $ac_prog; ac_word=$2
10635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10636$as_echo_n "checking for $ac_word... " >&6; }
10637if ${ac_cv_path_TAR+:} false; then :
10638  $as_echo_n "(cached) " >&6
10639else
10640  case $TAR in
10641  [\\/]* | ?:[\\/]*)
10642  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10643  ;;
10644  *)
10645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10646for as_dir in $PATH
10647do
10648  IFS=$as_save_IFS
10649  test -z "$as_dir" && as_dir=.
10650    for ac_exec_ext in '' $ac_executable_extensions; do
10651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10652    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10654    break 2
10655  fi
10656done
10657  done
10658IFS=$as_save_IFS
10659
10660  ;;
10661esac
10662fi
10663TAR=$ac_cv_path_TAR
10664if test -n "$TAR"; then
10665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10666$as_echo "$TAR" >&6; }
10667else
10668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10669$as_echo "no" >&6; }
10670fi
10671
10672
10673  test -n "$TAR" && break
10674done
10675
10676    else
10677      # If it succeeded, then it was overridden by the user. We will use it
10678      # for the tool.
10679
10680      # First remove it from the list of overridden variables, so we can test
10681      # for unknown variables in the end.
10682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10683
10684      # Check if we try to supply an empty value
10685      if test "x$TAR" = x; then
10686        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10687$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10688        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10689$as_echo_n "checking for TAR... " >&6; }
10690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10691$as_echo "disabled" >&6; }
10692      else
10693        # Check if the provided tool contains a complete path.
10694        tool_specified="$TAR"
10695        tool_basename="${tool_specified##*/}"
10696        if test "x$tool_basename" = "x$tool_specified"; then
10697          # A command without a complete path is provided, search $PATH.
10698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10699$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10700          # Extract the first word of "$tool_basename", so it can be a program name with args.
10701set dummy $tool_basename; ac_word=$2
10702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10703$as_echo_n "checking for $ac_word... " >&6; }
10704if ${ac_cv_path_TAR+:} false; then :
10705  $as_echo_n "(cached) " >&6
10706else
10707  case $TAR in
10708  [\\/]* | ?:[\\/]*)
10709  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10710  ;;
10711  *)
10712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10713for as_dir in $PATH
10714do
10715  IFS=$as_save_IFS
10716  test -z "$as_dir" && as_dir=.
10717    for ac_exec_ext in '' $ac_executable_extensions; do
10718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10719    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10721    break 2
10722  fi
10723done
10724  done
10725IFS=$as_save_IFS
10726
10727  ;;
10728esac
10729fi
10730TAR=$ac_cv_path_TAR
10731if test -n "$TAR"; then
10732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10733$as_echo "$TAR" >&6; }
10734else
10735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10736$as_echo "no" >&6; }
10737fi
10738
10739
10740          if test "x$TAR" = x; then
10741            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10742          fi
10743        else
10744          # Otherwise we believe it is a complete path. Use it as it is.
10745          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10746$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10747          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10748$as_echo_n "checking for TAR... " >&6; }
10749          if test ! -x "$tool_specified"; then
10750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10751$as_echo "not found" >&6; }
10752            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10753          fi
10754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10755$as_echo "$tool_specified" >&6; }
10756        fi
10757      fi
10758    fi
10759
10760  fi
10761
10762
10763
10764  if test "x$TAR" = x; then
10765    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10766  fi
10767
10768
10769
10770
10771
10772  # Publish this variable in the help.
10773
10774
10775  if [ -z "${TEE+x}" ]; then
10776    # The variable is not set by user, try to locate tool using the code snippet
10777    for ac_prog in tee
10778do
10779  # Extract the first word of "$ac_prog", so it can be a program name with args.
10780set dummy $ac_prog; ac_word=$2
10781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10782$as_echo_n "checking for $ac_word... " >&6; }
10783if ${ac_cv_path_TEE+:} false; then :
10784  $as_echo_n "(cached) " >&6
10785else
10786  case $TEE in
10787  [\\/]* | ?:[\\/]*)
10788  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10789  ;;
10790  *)
10791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10792for as_dir in $PATH
10793do
10794  IFS=$as_save_IFS
10795  test -z "$as_dir" && as_dir=.
10796    for ac_exec_ext in '' $ac_executable_extensions; do
10797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10798    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10800    break 2
10801  fi
10802done
10803  done
10804IFS=$as_save_IFS
10805
10806  ;;
10807esac
10808fi
10809TEE=$ac_cv_path_TEE
10810if test -n "$TEE"; then
10811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10812$as_echo "$TEE" >&6; }
10813else
10814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10815$as_echo "no" >&6; }
10816fi
10817
10818
10819  test -n "$TEE" && break
10820done
10821
10822  else
10823    # The variable is set, but is it from the command line or the environment?
10824
10825    # Try to remove the string !TEE! from our list.
10826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10828      # If it failed, the variable was not from the command line. Ignore it,
10829      # but warn the user (except for BASH, which is always set by the calling BASH).
10830      if test "xTEE" != xBASH; then
10831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10832$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10833      fi
10834      # Try to locate tool using the code snippet
10835      for ac_prog in tee
10836do
10837  # Extract the first word of "$ac_prog", so it can be a program name with args.
10838set dummy $ac_prog; ac_word=$2
10839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10840$as_echo_n "checking for $ac_word... " >&6; }
10841if ${ac_cv_path_TEE+:} false; then :
10842  $as_echo_n "(cached) " >&6
10843else
10844  case $TEE in
10845  [\\/]* | ?:[\\/]*)
10846  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10847  ;;
10848  *)
10849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10850for as_dir in $PATH
10851do
10852  IFS=$as_save_IFS
10853  test -z "$as_dir" && as_dir=.
10854    for ac_exec_ext in '' $ac_executable_extensions; do
10855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10856    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10858    break 2
10859  fi
10860done
10861  done
10862IFS=$as_save_IFS
10863
10864  ;;
10865esac
10866fi
10867TEE=$ac_cv_path_TEE
10868if test -n "$TEE"; then
10869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10870$as_echo "$TEE" >&6; }
10871else
10872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10873$as_echo "no" >&6; }
10874fi
10875
10876
10877  test -n "$TEE" && break
10878done
10879
10880    else
10881      # If it succeeded, then it was overridden by the user. We will use it
10882      # for the tool.
10883
10884      # First remove it from the list of overridden variables, so we can test
10885      # for unknown variables in the end.
10886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10887
10888      # Check if we try to supply an empty value
10889      if test "x$TEE" = x; then
10890        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10891$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10892        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10893$as_echo_n "checking for TEE... " >&6; }
10894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10895$as_echo "disabled" >&6; }
10896      else
10897        # Check if the provided tool contains a complete path.
10898        tool_specified="$TEE"
10899        tool_basename="${tool_specified##*/}"
10900        if test "x$tool_basename" = "x$tool_specified"; then
10901          # A command without a complete path is provided, search $PATH.
10902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10903$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10904          # Extract the first word of "$tool_basename", so it can be a program name with args.
10905set dummy $tool_basename; ac_word=$2
10906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10907$as_echo_n "checking for $ac_word... " >&6; }
10908if ${ac_cv_path_TEE+:} false; then :
10909  $as_echo_n "(cached) " >&6
10910else
10911  case $TEE in
10912  [\\/]* | ?:[\\/]*)
10913  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10914  ;;
10915  *)
10916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10917for as_dir in $PATH
10918do
10919  IFS=$as_save_IFS
10920  test -z "$as_dir" && as_dir=.
10921    for ac_exec_ext in '' $ac_executable_extensions; do
10922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10923    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10925    break 2
10926  fi
10927done
10928  done
10929IFS=$as_save_IFS
10930
10931  ;;
10932esac
10933fi
10934TEE=$ac_cv_path_TEE
10935if test -n "$TEE"; then
10936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10937$as_echo "$TEE" >&6; }
10938else
10939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10940$as_echo "no" >&6; }
10941fi
10942
10943
10944          if test "x$TEE" = x; then
10945            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10946          fi
10947        else
10948          # Otherwise we believe it is a complete path. Use it as it is.
10949          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10950$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10951          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10952$as_echo_n "checking for TEE... " >&6; }
10953          if test ! -x "$tool_specified"; then
10954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10955$as_echo "not found" >&6; }
10956            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10957          fi
10958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10959$as_echo "$tool_specified" >&6; }
10960        fi
10961      fi
10962    fi
10963
10964  fi
10965
10966
10967
10968  if test "x$TEE" = x; then
10969    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10970  fi
10971
10972
10973
10974
10975
10976  # Publish this variable in the help.
10977
10978
10979  if [ -z "${TOUCH+x}" ]; then
10980    # The variable is not set by user, try to locate tool using the code snippet
10981    for ac_prog in touch
10982do
10983  # Extract the first word of "$ac_prog", so it can be a program name with args.
10984set dummy $ac_prog; ac_word=$2
10985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10986$as_echo_n "checking for $ac_word... " >&6; }
10987if ${ac_cv_path_TOUCH+:} false; then :
10988  $as_echo_n "(cached) " >&6
10989else
10990  case $TOUCH in
10991  [\\/]* | ?:[\\/]*)
10992  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10993  ;;
10994  *)
10995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10996for as_dir in $PATH
10997do
10998  IFS=$as_save_IFS
10999  test -z "$as_dir" && as_dir=.
11000    for ac_exec_ext in '' $ac_executable_extensions; do
11001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11002    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11004    break 2
11005  fi
11006done
11007  done
11008IFS=$as_save_IFS
11009
11010  ;;
11011esac
11012fi
11013TOUCH=$ac_cv_path_TOUCH
11014if test -n "$TOUCH"; then
11015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11016$as_echo "$TOUCH" >&6; }
11017else
11018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11019$as_echo "no" >&6; }
11020fi
11021
11022
11023  test -n "$TOUCH" && break
11024done
11025
11026  else
11027    # The variable is set, but is it from the command line or the environment?
11028
11029    # Try to remove the string !TOUCH! from our list.
11030    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11031    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11032      # If it failed, the variable was not from the command line. Ignore it,
11033      # but warn the user (except for BASH, which is always set by the calling BASH).
11034      if test "xTOUCH" != xBASH; then
11035        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11036$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11037      fi
11038      # Try to locate tool using the code snippet
11039      for ac_prog in touch
11040do
11041  # Extract the first word of "$ac_prog", so it can be a program name with args.
11042set dummy $ac_prog; ac_word=$2
11043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11044$as_echo_n "checking for $ac_word... " >&6; }
11045if ${ac_cv_path_TOUCH+:} false; then :
11046  $as_echo_n "(cached) " >&6
11047else
11048  case $TOUCH in
11049  [\\/]* | ?:[\\/]*)
11050  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11051  ;;
11052  *)
11053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11054for as_dir in $PATH
11055do
11056  IFS=$as_save_IFS
11057  test -z "$as_dir" && as_dir=.
11058    for ac_exec_ext in '' $ac_executable_extensions; do
11059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11060    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11062    break 2
11063  fi
11064done
11065  done
11066IFS=$as_save_IFS
11067
11068  ;;
11069esac
11070fi
11071TOUCH=$ac_cv_path_TOUCH
11072if test -n "$TOUCH"; then
11073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11074$as_echo "$TOUCH" >&6; }
11075else
11076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11077$as_echo "no" >&6; }
11078fi
11079
11080
11081  test -n "$TOUCH" && break
11082done
11083
11084    else
11085      # If it succeeded, then it was overridden by the user. We will use it
11086      # for the tool.
11087
11088      # First remove it from the list of overridden variables, so we can test
11089      # for unknown variables in the end.
11090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11091
11092      # Check if we try to supply an empty value
11093      if test "x$TOUCH" = x; then
11094        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11095$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11096        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11097$as_echo_n "checking for TOUCH... " >&6; }
11098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11099$as_echo "disabled" >&6; }
11100      else
11101        # Check if the provided tool contains a complete path.
11102        tool_specified="$TOUCH"
11103        tool_basename="${tool_specified##*/}"
11104        if test "x$tool_basename" = "x$tool_specified"; then
11105          # A command without a complete path is provided, search $PATH.
11106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11107$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11108          # Extract the first word of "$tool_basename", so it can be a program name with args.
11109set dummy $tool_basename; ac_word=$2
11110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11111$as_echo_n "checking for $ac_word... " >&6; }
11112if ${ac_cv_path_TOUCH+:} false; then :
11113  $as_echo_n "(cached) " >&6
11114else
11115  case $TOUCH in
11116  [\\/]* | ?:[\\/]*)
11117  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11118  ;;
11119  *)
11120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11121for as_dir in $PATH
11122do
11123  IFS=$as_save_IFS
11124  test -z "$as_dir" && as_dir=.
11125    for ac_exec_ext in '' $ac_executable_extensions; do
11126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11127    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11129    break 2
11130  fi
11131done
11132  done
11133IFS=$as_save_IFS
11134
11135  ;;
11136esac
11137fi
11138TOUCH=$ac_cv_path_TOUCH
11139if test -n "$TOUCH"; then
11140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11141$as_echo "$TOUCH" >&6; }
11142else
11143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11144$as_echo "no" >&6; }
11145fi
11146
11147
11148          if test "x$TOUCH" = x; then
11149            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11150          fi
11151        else
11152          # Otherwise we believe it is a complete path. Use it as it is.
11153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11154$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11155          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11156$as_echo_n "checking for TOUCH... " >&6; }
11157          if test ! -x "$tool_specified"; then
11158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11159$as_echo "not found" >&6; }
11160            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11161          fi
11162          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11163$as_echo "$tool_specified" >&6; }
11164        fi
11165      fi
11166    fi
11167
11168  fi
11169
11170
11171
11172  if test "x$TOUCH" = x; then
11173    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11174  fi
11175
11176
11177
11178
11179
11180  # Publish this variable in the help.
11181
11182
11183  if [ -z "${TR+x}" ]; then
11184    # The variable is not set by user, try to locate tool using the code snippet
11185    for ac_prog in tr
11186do
11187  # Extract the first word of "$ac_prog", so it can be a program name with args.
11188set dummy $ac_prog; ac_word=$2
11189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11190$as_echo_n "checking for $ac_word... " >&6; }
11191if ${ac_cv_path_TR+:} false; then :
11192  $as_echo_n "(cached) " >&6
11193else
11194  case $TR in
11195  [\\/]* | ?:[\\/]*)
11196  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11197  ;;
11198  *)
11199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11200for as_dir in $PATH
11201do
11202  IFS=$as_save_IFS
11203  test -z "$as_dir" && as_dir=.
11204    for ac_exec_ext in '' $ac_executable_extensions; do
11205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11206    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11208    break 2
11209  fi
11210done
11211  done
11212IFS=$as_save_IFS
11213
11214  ;;
11215esac
11216fi
11217TR=$ac_cv_path_TR
11218if test -n "$TR"; then
11219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11220$as_echo "$TR" >&6; }
11221else
11222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11223$as_echo "no" >&6; }
11224fi
11225
11226
11227  test -n "$TR" && break
11228done
11229
11230  else
11231    # The variable is set, but is it from the command line or the environment?
11232
11233    # Try to remove the string !TR! from our list.
11234    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11235    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11236      # If it failed, the variable was not from the command line. Ignore it,
11237      # but warn the user (except for BASH, which is always set by the calling BASH).
11238      if test "xTR" != xBASH; then
11239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11240$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11241      fi
11242      # Try to locate tool using the code snippet
11243      for ac_prog in tr
11244do
11245  # Extract the first word of "$ac_prog", so it can be a program name with args.
11246set dummy $ac_prog; ac_word=$2
11247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11248$as_echo_n "checking for $ac_word... " >&6; }
11249if ${ac_cv_path_TR+:} false; then :
11250  $as_echo_n "(cached) " >&6
11251else
11252  case $TR in
11253  [\\/]* | ?:[\\/]*)
11254  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11255  ;;
11256  *)
11257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11258for as_dir in $PATH
11259do
11260  IFS=$as_save_IFS
11261  test -z "$as_dir" && as_dir=.
11262    for ac_exec_ext in '' $ac_executable_extensions; do
11263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11264    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11266    break 2
11267  fi
11268done
11269  done
11270IFS=$as_save_IFS
11271
11272  ;;
11273esac
11274fi
11275TR=$ac_cv_path_TR
11276if test -n "$TR"; then
11277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11278$as_echo "$TR" >&6; }
11279else
11280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11281$as_echo "no" >&6; }
11282fi
11283
11284
11285  test -n "$TR" && break
11286done
11287
11288    else
11289      # If it succeeded, then it was overridden by the user. We will use it
11290      # for the tool.
11291
11292      # First remove it from the list of overridden variables, so we can test
11293      # for unknown variables in the end.
11294      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11295
11296      # Check if we try to supply an empty value
11297      if test "x$TR" = x; then
11298        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11299$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11301$as_echo_n "checking for TR... " >&6; }
11302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11303$as_echo "disabled" >&6; }
11304      else
11305        # Check if the provided tool contains a complete path.
11306        tool_specified="$TR"
11307        tool_basename="${tool_specified##*/}"
11308        if test "x$tool_basename" = "x$tool_specified"; then
11309          # A command without a complete path is provided, search $PATH.
11310          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11311$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11312          # Extract the first word of "$tool_basename", so it can be a program name with args.
11313set dummy $tool_basename; ac_word=$2
11314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11315$as_echo_n "checking for $ac_word... " >&6; }
11316if ${ac_cv_path_TR+:} false; then :
11317  $as_echo_n "(cached) " >&6
11318else
11319  case $TR in
11320  [\\/]* | ?:[\\/]*)
11321  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11322  ;;
11323  *)
11324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11325for as_dir in $PATH
11326do
11327  IFS=$as_save_IFS
11328  test -z "$as_dir" && as_dir=.
11329    for ac_exec_ext in '' $ac_executable_extensions; do
11330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11331    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11333    break 2
11334  fi
11335done
11336  done
11337IFS=$as_save_IFS
11338
11339  ;;
11340esac
11341fi
11342TR=$ac_cv_path_TR
11343if test -n "$TR"; then
11344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11345$as_echo "$TR" >&6; }
11346else
11347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11348$as_echo "no" >&6; }
11349fi
11350
11351
11352          if test "x$TR" = x; then
11353            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11354          fi
11355        else
11356          # Otherwise we believe it is a complete path. Use it as it is.
11357          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11358$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11359          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11360$as_echo_n "checking for TR... " >&6; }
11361          if test ! -x "$tool_specified"; then
11362            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11363$as_echo "not found" >&6; }
11364            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11365          fi
11366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11367$as_echo "$tool_specified" >&6; }
11368        fi
11369      fi
11370    fi
11371
11372  fi
11373
11374
11375
11376  if test "x$TR" = x; then
11377    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11378  fi
11379
11380
11381
11382
11383
11384  # Publish this variable in the help.
11385
11386
11387  if [ -z "${UNAME+x}" ]; then
11388    # The variable is not set by user, try to locate tool using the code snippet
11389    for ac_prog in uname
11390do
11391  # Extract the first word of "$ac_prog", so it can be a program name with args.
11392set dummy $ac_prog; ac_word=$2
11393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11394$as_echo_n "checking for $ac_word... " >&6; }
11395if ${ac_cv_path_UNAME+:} false; then :
11396  $as_echo_n "(cached) " >&6
11397else
11398  case $UNAME in
11399  [\\/]* | ?:[\\/]*)
11400  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11401  ;;
11402  *)
11403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11404for as_dir in $PATH
11405do
11406  IFS=$as_save_IFS
11407  test -z "$as_dir" && as_dir=.
11408    for ac_exec_ext in '' $ac_executable_extensions; do
11409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11410    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11412    break 2
11413  fi
11414done
11415  done
11416IFS=$as_save_IFS
11417
11418  ;;
11419esac
11420fi
11421UNAME=$ac_cv_path_UNAME
11422if test -n "$UNAME"; then
11423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11424$as_echo "$UNAME" >&6; }
11425else
11426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11427$as_echo "no" >&6; }
11428fi
11429
11430
11431  test -n "$UNAME" && break
11432done
11433
11434  else
11435    # The variable is set, but is it from the command line or the environment?
11436
11437    # Try to remove the string !UNAME! from our list.
11438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11440      # If it failed, the variable was not from the command line. Ignore it,
11441      # but warn the user (except for BASH, which is always set by the calling BASH).
11442      if test "xUNAME" != xBASH; then
11443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11444$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11445      fi
11446      # Try to locate tool using the code snippet
11447      for ac_prog in uname
11448do
11449  # Extract the first word of "$ac_prog", so it can be a program name with args.
11450set dummy $ac_prog; ac_word=$2
11451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11452$as_echo_n "checking for $ac_word... " >&6; }
11453if ${ac_cv_path_UNAME+:} false; then :
11454  $as_echo_n "(cached) " >&6
11455else
11456  case $UNAME in
11457  [\\/]* | ?:[\\/]*)
11458  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11459  ;;
11460  *)
11461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11462for as_dir in $PATH
11463do
11464  IFS=$as_save_IFS
11465  test -z "$as_dir" && as_dir=.
11466    for ac_exec_ext in '' $ac_executable_extensions; do
11467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11468    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11470    break 2
11471  fi
11472done
11473  done
11474IFS=$as_save_IFS
11475
11476  ;;
11477esac
11478fi
11479UNAME=$ac_cv_path_UNAME
11480if test -n "$UNAME"; then
11481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11482$as_echo "$UNAME" >&6; }
11483else
11484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11485$as_echo "no" >&6; }
11486fi
11487
11488
11489  test -n "$UNAME" && break
11490done
11491
11492    else
11493      # If it succeeded, then it was overridden by the user. We will use it
11494      # for the tool.
11495
11496      # First remove it from the list of overridden variables, so we can test
11497      # for unknown variables in the end.
11498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11499
11500      # Check if we try to supply an empty value
11501      if test "x$UNAME" = x; then
11502        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11503$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11505$as_echo_n "checking for UNAME... " >&6; }
11506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11507$as_echo "disabled" >&6; }
11508      else
11509        # Check if the provided tool contains a complete path.
11510        tool_specified="$UNAME"
11511        tool_basename="${tool_specified##*/}"
11512        if test "x$tool_basename" = "x$tool_specified"; then
11513          # A command without a complete path is provided, search $PATH.
11514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11515$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11516          # Extract the first word of "$tool_basename", so it can be a program name with args.
11517set dummy $tool_basename; ac_word=$2
11518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11519$as_echo_n "checking for $ac_word... " >&6; }
11520if ${ac_cv_path_UNAME+:} false; then :
11521  $as_echo_n "(cached) " >&6
11522else
11523  case $UNAME in
11524  [\\/]* | ?:[\\/]*)
11525  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11526  ;;
11527  *)
11528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11529for as_dir in $PATH
11530do
11531  IFS=$as_save_IFS
11532  test -z "$as_dir" && as_dir=.
11533    for ac_exec_ext in '' $ac_executable_extensions; do
11534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11535    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11537    break 2
11538  fi
11539done
11540  done
11541IFS=$as_save_IFS
11542
11543  ;;
11544esac
11545fi
11546UNAME=$ac_cv_path_UNAME
11547if test -n "$UNAME"; then
11548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11549$as_echo "$UNAME" >&6; }
11550else
11551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11552$as_echo "no" >&6; }
11553fi
11554
11555
11556          if test "x$UNAME" = x; then
11557            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11558          fi
11559        else
11560          # Otherwise we believe it is a complete path. Use it as it is.
11561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11562$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11563          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11564$as_echo_n "checking for UNAME... " >&6; }
11565          if test ! -x "$tool_specified"; then
11566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11567$as_echo "not found" >&6; }
11568            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11569          fi
11570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11571$as_echo "$tool_specified" >&6; }
11572        fi
11573      fi
11574    fi
11575
11576  fi
11577
11578
11579
11580  if test "x$UNAME" = x; then
11581    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11582  fi
11583
11584
11585
11586
11587
11588  # Publish this variable in the help.
11589
11590
11591  if [ -z "${UNIQ+x}" ]; then
11592    # The variable is not set by user, try to locate tool using the code snippet
11593    for ac_prog in uniq
11594do
11595  # Extract the first word of "$ac_prog", so it can be a program name with args.
11596set dummy $ac_prog; ac_word=$2
11597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11598$as_echo_n "checking for $ac_word... " >&6; }
11599if ${ac_cv_path_UNIQ+:} false; then :
11600  $as_echo_n "(cached) " >&6
11601else
11602  case $UNIQ in
11603  [\\/]* | ?:[\\/]*)
11604  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11605  ;;
11606  *)
11607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11608for as_dir in $PATH
11609do
11610  IFS=$as_save_IFS
11611  test -z "$as_dir" && as_dir=.
11612    for ac_exec_ext in '' $ac_executable_extensions; do
11613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11614    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11616    break 2
11617  fi
11618done
11619  done
11620IFS=$as_save_IFS
11621
11622  ;;
11623esac
11624fi
11625UNIQ=$ac_cv_path_UNIQ
11626if test -n "$UNIQ"; then
11627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11628$as_echo "$UNIQ" >&6; }
11629else
11630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11631$as_echo "no" >&6; }
11632fi
11633
11634
11635  test -n "$UNIQ" && break
11636done
11637
11638  else
11639    # The variable is set, but is it from the command line or the environment?
11640
11641    # Try to remove the string !UNIQ! from our list.
11642    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11643    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11644      # If it failed, the variable was not from the command line. Ignore it,
11645      # but warn the user (except for BASH, which is always set by the calling BASH).
11646      if test "xUNIQ" != xBASH; then
11647        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11648$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11649      fi
11650      # Try to locate tool using the code snippet
11651      for ac_prog in uniq
11652do
11653  # Extract the first word of "$ac_prog", so it can be a program name with args.
11654set dummy $ac_prog; ac_word=$2
11655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11656$as_echo_n "checking for $ac_word... " >&6; }
11657if ${ac_cv_path_UNIQ+:} false; then :
11658  $as_echo_n "(cached) " >&6
11659else
11660  case $UNIQ in
11661  [\\/]* | ?:[\\/]*)
11662  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11663  ;;
11664  *)
11665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11666for as_dir in $PATH
11667do
11668  IFS=$as_save_IFS
11669  test -z "$as_dir" && as_dir=.
11670    for ac_exec_ext in '' $ac_executable_extensions; do
11671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11672    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11674    break 2
11675  fi
11676done
11677  done
11678IFS=$as_save_IFS
11679
11680  ;;
11681esac
11682fi
11683UNIQ=$ac_cv_path_UNIQ
11684if test -n "$UNIQ"; then
11685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11686$as_echo "$UNIQ" >&6; }
11687else
11688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11689$as_echo "no" >&6; }
11690fi
11691
11692
11693  test -n "$UNIQ" && break
11694done
11695
11696    else
11697      # If it succeeded, then it was overridden by the user. We will use it
11698      # for the tool.
11699
11700      # First remove it from the list of overridden variables, so we can test
11701      # for unknown variables in the end.
11702      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11703
11704      # Check if we try to supply an empty value
11705      if test "x$UNIQ" = x; then
11706        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11707$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11708        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11709$as_echo_n "checking for UNIQ... " >&6; }
11710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11711$as_echo "disabled" >&6; }
11712      else
11713        # Check if the provided tool contains a complete path.
11714        tool_specified="$UNIQ"
11715        tool_basename="${tool_specified##*/}"
11716        if test "x$tool_basename" = "x$tool_specified"; then
11717          # A command without a complete path is provided, search $PATH.
11718          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11719$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11720          # Extract the first word of "$tool_basename", so it can be a program name with args.
11721set dummy $tool_basename; ac_word=$2
11722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11723$as_echo_n "checking for $ac_word... " >&6; }
11724if ${ac_cv_path_UNIQ+:} false; then :
11725  $as_echo_n "(cached) " >&6
11726else
11727  case $UNIQ in
11728  [\\/]* | ?:[\\/]*)
11729  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11730  ;;
11731  *)
11732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11733for as_dir in $PATH
11734do
11735  IFS=$as_save_IFS
11736  test -z "$as_dir" && as_dir=.
11737    for ac_exec_ext in '' $ac_executable_extensions; do
11738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11739    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11741    break 2
11742  fi
11743done
11744  done
11745IFS=$as_save_IFS
11746
11747  ;;
11748esac
11749fi
11750UNIQ=$ac_cv_path_UNIQ
11751if test -n "$UNIQ"; then
11752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11753$as_echo "$UNIQ" >&6; }
11754else
11755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11756$as_echo "no" >&6; }
11757fi
11758
11759
11760          if test "x$UNIQ" = x; then
11761            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11762          fi
11763        else
11764          # Otherwise we believe it is a complete path. Use it as it is.
11765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11766$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11767          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11768$as_echo_n "checking for UNIQ... " >&6; }
11769          if test ! -x "$tool_specified"; then
11770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11771$as_echo "not found" >&6; }
11772            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11773          fi
11774          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11775$as_echo "$tool_specified" >&6; }
11776        fi
11777      fi
11778    fi
11779
11780  fi
11781
11782
11783
11784  if test "x$UNIQ" = x; then
11785    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11786  fi
11787
11788
11789
11790
11791
11792  # Publish this variable in the help.
11793
11794
11795  if [ -z "${WC+x}" ]; then
11796    # The variable is not set by user, try to locate tool using the code snippet
11797    for ac_prog in wc
11798do
11799  # Extract the first word of "$ac_prog", so it can be a program name with args.
11800set dummy $ac_prog; ac_word=$2
11801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11802$as_echo_n "checking for $ac_word... " >&6; }
11803if ${ac_cv_path_WC+:} false; then :
11804  $as_echo_n "(cached) " >&6
11805else
11806  case $WC in
11807  [\\/]* | ?:[\\/]*)
11808  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11809  ;;
11810  *)
11811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11812for as_dir in $PATH
11813do
11814  IFS=$as_save_IFS
11815  test -z "$as_dir" && as_dir=.
11816    for ac_exec_ext in '' $ac_executable_extensions; do
11817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11818    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11820    break 2
11821  fi
11822done
11823  done
11824IFS=$as_save_IFS
11825
11826  ;;
11827esac
11828fi
11829WC=$ac_cv_path_WC
11830if test -n "$WC"; then
11831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11832$as_echo "$WC" >&6; }
11833else
11834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11835$as_echo "no" >&6; }
11836fi
11837
11838
11839  test -n "$WC" && break
11840done
11841
11842  else
11843    # The variable is set, but is it from the command line or the environment?
11844
11845    # Try to remove the string !WC! from our list.
11846    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11847    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11848      # If it failed, the variable was not from the command line. Ignore it,
11849      # but warn the user (except for BASH, which is always set by the calling BASH).
11850      if test "xWC" != xBASH; then
11851        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11852$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11853      fi
11854      # Try to locate tool using the code snippet
11855      for ac_prog in wc
11856do
11857  # Extract the first word of "$ac_prog", so it can be a program name with args.
11858set dummy $ac_prog; ac_word=$2
11859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11860$as_echo_n "checking for $ac_word... " >&6; }
11861if ${ac_cv_path_WC+:} false; then :
11862  $as_echo_n "(cached) " >&6
11863else
11864  case $WC in
11865  [\\/]* | ?:[\\/]*)
11866  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11867  ;;
11868  *)
11869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11870for as_dir in $PATH
11871do
11872  IFS=$as_save_IFS
11873  test -z "$as_dir" && as_dir=.
11874    for ac_exec_ext in '' $ac_executable_extensions; do
11875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11876    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11878    break 2
11879  fi
11880done
11881  done
11882IFS=$as_save_IFS
11883
11884  ;;
11885esac
11886fi
11887WC=$ac_cv_path_WC
11888if test -n "$WC"; then
11889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11890$as_echo "$WC" >&6; }
11891else
11892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11893$as_echo "no" >&6; }
11894fi
11895
11896
11897  test -n "$WC" && break
11898done
11899
11900    else
11901      # If it succeeded, then it was overridden by the user. We will use it
11902      # for the tool.
11903
11904      # First remove it from the list of overridden variables, so we can test
11905      # for unknown variables in the end.
11906      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11907
11908      # Check if we try to supply an empty value
11909      if test "x$WC" = x; then
11910        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11911$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11913$as_echo_n "checking for WC... " >&6; }
11914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11915$as_echo "disabled" >&6; }
11916      else
11917        # Check if the provided tool contains a complete path.
11918        tool_specified="$WC"
11919        tool_basename="${tool_specified##*/}"
11920        if test "x$tool_basename" = "x$tool_specified"; then
11921          # A command without a complete path is provided, search $PATH.
11922          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11923$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11924          # Extract the first word of "$tool_basename", so it can be a program name with args.
11925set dummy $tool_basename; ac_word=$2
11926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11927$as_echo_n "checking for $ac_word... " >&6; }
11928if ${ac_cv_path_WC+:} false; then :
11929  $as_echo_n "(cached) " >&6
11930else
11931  case $WC in
11932  [\\/]* | ?:[\\/]*)
11933  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11934  ;;
11935  *)
11936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11937for as_dir in $PATH
11938do
11939  IFS=$as_save_IFS
11940  test -z "$as_dir" && as_dir=.
11941    for ac_exec_ext in '' $ac_executable_extensions; do
11942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11943    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11945    break 2
11946  fi
11947done
11948  done
11949IFS=$as_save_IFS
11950
11951  ;;
11952esac
11953fi
11954WC=$ac_cv_path_WC
11955if test -n "$WC"; then
11956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11957$as_echo "$WC" >&6; }
11958else
11959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11960$as_echo "no" >&6; }
11961fi
11962
11963
11964          if test "x$WC" = x; then
11965            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11966          fi
11967        else
11968          # Otherwise we believe it is a complete path. Use it as it is.
11969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11970$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11971          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11972$as_echo_n "checking for WC... " >&6; }
11973          if test ! -x "$tool_specified"; then
11974            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11975$as_echo "not found" >&6; }
11976            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11977          fi
11978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11979$as_echo "$tool_specified" >&6; }
11980        fi
11981      fi
11982    fi
11983
11984  fi
11985
11986
11987
11988  if test "x$WC" = x; then
11989    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11990  fi
11991
11992
11993
11994
11995
11996  # Publish this variable in the help.
11997
11998
11999  if [ -z "${WHICH+x}" ]; then
12000    # The variable is not set by user, try to locate tool using the code snippet
12001    for ac_prog in which
12002do
12003  # Extract the first word of "$ac_prog", so it can be a program name with args.
12004set dummy $ac_prog; ac_word=$2
12005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12006$as_echo_n "checking for $ac_word... " >&6; }
12007if ${ac_cv_path_WHICH+:} false; then :
12008  $as_echo_n "(cached) " >&6
12009else
12010  case $WHICH in
12011  [\\/]* | ?:[\\/]*)
12012  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12013  ;;
12014  *)
12015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12016for as_dir in $PATH
12017do
12018  IFS=$as_save_IFS
12019  test -z "$as_dir" && as_dir=.
12020    for ac_exec_ext in '' $ac_executable_extensions; do
12021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12022    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12024    break 2
12025  fi
12026done
12027  done
12028IFS=$as_save_IFS
12029
12030  ;;
12031esac
12032fi
12033WHICH=$ac_cv_path_WHICH
12034if test -n "$WHICH"; then
12035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12036$as_echo "$WHICH" >&6; }
12037else
12038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12039$as_echo "no" >&6; }
12040fi
12041
12042
12043  test -n "$WHICH" && break
12044done
12045
12046  else
12047    # The variable is set, but is it from the command line or the environment?
12048
12049    # Try to remove the string !WHICH! from our list.
12050    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12051    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12052      # If it failed, the variable was not from the command line. Ignore it,
12053      # but warn the user (except for BASH, which is always set by the calling BASH).
12054      if test "xWHICH" != xBASH; then
12055        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12056$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12057      fi
12058      # Try to locate tool using the code snippet
12059      for ac_prog in which
12060do
12061  # Extract the first word of "$ac_prog", so it can be a program name with args.
12062set dummy $ac_prog; ac_word=$2
12063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12064$as_echo_n "checking for $ac_word... " >&6; }
12065if ${ac_cv_path_WHICH+:} false; then :
12066  $as_echo_n "(cached) " >&6
12067else
12068  case $WHICH in
12069  [\\/]* | ?:[\\/]*)
12070  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12071  ;;
12072  *)
12073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12074for as_dir in $PATH
12075do
12076  IFS=$as_save_IFS
12077  test -z "$as_dir" && as_dir=.
12078    for ac_exec_ext in '' $ac_executable_extensions; do
12079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12080    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12082    break 2
12083  fi
12084done
12085  done
12086IFS=$as_save_IFS
12087
12088  ;;
12089esac
12090fi
12091WHICH=$ac_cv_path_WHICH
12092if test -n "$WHICH"; then
12093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12094$as_echo "$WHICH" >&6; }
12095else
12096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12097$as_echo "no" >&6; }
12098fi
12099
12100
12101  test -n "$WHICH" && break
12102done
12103
12104    else
12105      # If it succeeded, then it was overridden by the user. We will use it
12106      # for the tool.
12107
12108      # First remove it from the list of overridden variables, so we can test
12109      # for unknown variables in the end.
12110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12111
12112      # Check if we try to supply an empty value
12113      if test "x$WHICH" = x; then
12114        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12115$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12117$as_echo_n "checking for WHICH... " >&6; }
12118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12119$as_echo "disabled" >&6; }
12120      else
12121        # Check if the provided tool contains a complete path.
12122        tool_specified="$WHICH"
12123        tool_basename="${tool_specified##*/}"
12124        if test "x$tool_basename" = "x$tool_specified"; then
12125          # A command without a complete path is provided, search $PATH.
12126          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12127$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12128          # Extract the first word of "$tool_basename", so it can be a program name with args.
12129set dummy $tool_basename; ac_word=$2
12130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12131$as_echo_n "checking for $ac_word... " >&6; }
12132if ${ac_cv_path_WHICH+:} false; then :
12133  $as_echo_n "(cached) " >&6
12134else
12135  case $WHICH in
12136  [\\/]* | ?:[\\/]*)
12137  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12138  ;;
12139  *)
12140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12141for as_dir in $PATH
12142do
12143  IFS=$as_save_IFS
12144  test -z "$as_dir" && as_dir=.
12145    for ac_exec_ext in '' $ac_executable_extensions; do
12146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12147    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12149    break 2
12150  fi
12151done
12152  done
12153IFS=$as_save_IFS
12154
12155  ;;
12156esac
12157fi
12158WHICH=$ac_cv_path_WHICH
12159if test -n "$WHICH"; then
12160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12161$as_echo "$WHICH" >&6; }
12162else
12163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12164$as_echo "no" >&6; }
12165fi
12166
12167
12168          if test "x$WHICH" = x; then
12169            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12170          fi
12171        else
12172          # Otherwise we believe it is a complete path. Use it as it is.
12173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12174$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12175          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12176$as_echo_n "checking for WHICH... " >&6; }
12177          if test ! -x "$tool_specified"; then
12178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12179$as_echo "not found" >&6; }
12180            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12181          fi
12182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12183$as_echo "$tool_specified" >&6; }
12184        fi
12185      fi
12186    fi
12187
12188  fi
12189
12190
12191
12192  if test "x$WHICH" = x; then
12193    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12194  fi
12195
12196
12197
12198
12199
12200  # Publish this variable in the help.
12201
12202
12203  if [ -z "${XARGS+x}" ]; then
12204    # The variable is not set by user, try to locate tool using the code snippet
12205    for ac_prog in xargs
12206do
12207  # Extract the first word of "$ac_prog", so it can be a program name with args.
12208set dummy $ac_prog; ac_word=$2
12209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12210$as_echo_n "checking for $ac_word... " >&6; }
12211if ${ac_cv_path_XARGS+:} false; then :
12212  $as_echo_n "(cached) " >&6
12213else
12214  case $XARGS in
12215  [\\/]* | ?:[\\/]*)
12216  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12217  ;;
12218  *)
12219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12220for as_dir in $PATH
12221do
12222  IFS=$as_save_IFS
12223  test -z "$as_dir" && as_dir=.
12224    for ac_exec_ext in '' $ac_executable_extensions; do
12225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12226    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12228    break 2
12229  fi
12230done
12231  done
12232IFS=$as_save_IFS
12233
12234  ;;
12235esac
12236fi
12237XARGS=$ac_cv_path_XARGS
12238if test -n "$XARGS"; then
12239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12240$as_echo "$XARGS" >&6; }
12241else
12242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12243$as_echo "no" >&6; }
12244fi
12245
12246
12247  test -n "$XARGS" && break
12248done
12249
12250  else
12251    # The variable is set, but is it from the command line or the environment?
12252
12253    # Try to remove the string !XARGS! from our list.
12254    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12255    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12256      # If it failed, the variable was not from the command line. Ignore it,
12257      # but warn the user (except for BASH, which is always set by the calling BASH).
12258      if test "xXARGS" != xBASH; then
12259        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12260$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12261      fi
12262      # Try to locate tool using the code snippet
12263      for ac_prog in xargs
12264do
12265  # Extract the first word of "$ac_prog", so it can be a program name with args.
12266set dummy $ac_prog; ac_word=$2
12267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12268$as_echo_n "checking for $ac_word... " >&6; }
12269if ${ac_cv_path_XARGS+:} false; then :
12270  $as_echo_n "(cached) " >&6
12271else
12272  case $XARGS in
12273  [\\/]* | ?:[\\/]*)
12274  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12275  ;;
12276  *)
12277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12278for as_dir in $PATH
12279do
12280  IFS=$as_save_IFS
12281  test -z "$as_dir" && as_dir=.
12282    for ac_exec_ext in '' $ac_executable_extensions; do
12283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12284    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12286    break 2
12287  fi
12288done
12289  done
12290IFS=$as_save_IFS
12291
12292  ;;
12293esac
12294fi
12295XARGS=$ac_cv_path_XARGS
12296if test -n "$XARGS"; then
12297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12298$as_echo "$XARGS" >&6; }
12299else
12300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12301$as_echo "no" >&6; }
12302fi
12303
12304
12305  test -n "$XARGS" && break
12306done
12307
12308    else
12309      # If it succeeded, then it was overridden by the user. We will use it
12310      # for the tool.
12311
12312      # First remove it from the list of overridden variables, so we can test
12313      # for unknown variables in the end.
12314      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12315
12316      # Check if we try to supply an empty value
12317      if test "x$XARGS" = x; then
12318        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12319$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12320        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12321$as_echo_n "checking for XARGS... " >&6; }
12322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12323$as_echo "disabled" >&6; }
12324      else
12325        # Check if the provided tool contains a complete path.
12326        tool_specified="$XARGS"
12327        tool_basename="${tool_specified##*/}"
12328        if test "x$tool_basename" = "x$tool_specified"; then
12329          # A command without a complete path is provided, search $PATH.
12330          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12331$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12332          # Extract the first word of "$tool_basename", so it can be a program name with args.
12333set dummy $tool_basename; ac_word=$2
12334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12335$as_echo_n "checking for $ac_word... " >&6; }
12336if ${ac_cv_path_XARGS+:} false; then :
12337  $as_echo_n "(cached) " >&6
12338else
12339  case $XARGS in
12340  [\\/]* | ?:[\\/]*)
12341  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12342  ;;
12343  *)
12344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12345for as_dir in $PATH
12346do
12347  IFS=$as_save_IFS
12348  test -z "$as_dir" && as_dir=.
12349    for ac_exec_ext in '' $ac_executable_extensions; do
12350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12351    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12353    break 2
12354  fi
12355done
12356  done
12357IFS=$as_save_IFS
12358
12359  ;;
12360esac
12361fi
12362XARGS=$ac_cv_path_XARGS
12363if test -n "$XARGS"; then
12364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12365$as_echo "$XARGS" >&6; }
12366else
12367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12368$as_echo "no" >&6; }
12369fi
12370
12371
12372          if test "x$XARGS" = x; then
12373            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12374          fi
12375        else
12376          # Otherwise we believe it is a complete path. Use it as it is.
12377          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12378$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12379          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12380$as_echo_n "checking for XARGS... " >&6; }
12381          if test ! -x "$tool_specified"; then
12382            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12383$as_echo "not found" >&6; }
12384            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12385          fi
12386          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12387$as_echo "$tool_specified" >&6; }
12388        fi
12389      fi
12390    fi
12391
12392  fi
12393
12394
12395
12396  if test "x$XARGS" = x; then
12397    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12398  fi
12399
12400
12401
12402  # Then required tools that require some special treatment.
12403
12404
12405  # Publish this variable in the help.
12406
12407
12408  if [ -z "${AWK+x}" ]; then
12409    # The variable is not set by user, try to locate tool using the code snippet
12410    for ac_prog in gawk mawk nawk awk
12411do
12412  # Extract the first word of "$ac_prog", so it can be a program name with args.
12413set dummy $ac_prog; ac_word=$2
12414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12415$as_echo_n "checking for $ac_word... " >&6; }
12416if ${ac_cv_prog_AWK+:} false; then :
12417  $as_echo_n "(cached) " >&6
12418else
12419  if test -n "$AWK"; then
12420  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12421else
12422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12423for as_dir in $PATH
12424do
12425  IFS=$as_save_IFS
12426  test -z "$as_dir" && as_dir=.
12427    for ac_exec_ext in '' $ac_executable_extensions; do
12428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12429    ac_cv_prog_AWK="$ac_prog"
12430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12431    break 2
12432  fi
12433done
12434  done
12435IFS=$as_save_IFS
12436
12437fi
12438fi
12439AWK=$ac_cv_prog_AWK
12440if test -n "$AWK"; then
12441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12442$as_echo "$AWK" >&6; }
12443else
12444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12445$as_echo "no" >&6; }
12446fi
12447
12448
12449  test -n "$AWK" && break
12450done
12451
12452  else
12453    # The variable is set, but is it from the command line or the environment?
12454
12455    # Try to remove the string !AWK! from our list.
12456    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12457    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12458      # If it failed, the variable was not from the command line. Ignore it,
12459      # but warn the user (except for BASH, which is always set by the calling BASH).
12460      if test "xAWK" != xBASH; then
12461        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12462$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12463      fi
12464      # Try to locate tool using the code snippet
12465      for ac_prog in gawk mawk nawk awk
12466do
12467  # Extract the first word of "$ac_prog", so it can be a program name with args.
12468set dummy $ac_prog; ac_word=$2
12469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12470$as_echo_n "checking for $ac_word... " >&6; }
12471if ${ac_cv_prog_AWK+:} false; then :
12472  $as_echo_n "(cached) " >&6
12473else
12474  if test -n "$AWK"; then
12475  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12476else
12477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12478for as_dir in $PATH
12479do
12480  IFS=$as_save_IFS
12481  test -z "$as_dir" && as_dir=.
12482    for ac_exec_ext in '' $ac_executable_extensions; do
12483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12484    ac_cv_prog_AWK="$ac_prog"
12485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12486    break 2
12487  fi
12488done
12489  done
12490IFS=$as_save_IFS
12491
12492fi
12493fi
12494AWK=$ac_cv_prog_AWK
12495if test -n "$AWK"; then
12496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12497$as_echo "$AWK" >&6; }
12498else
12499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12500$as_echo "no" >&6; }
12501fi
12502
12503
12504  test -n "$AWK" && break
12505done
12506
12507    else
12508      # If it succeeded, then it was overridden by the user. We will use it
12509      # for the tool.
12510
12511      # First remove it from the list of overridden variables, so we can test
12512      # for unknown variables in the end.
12513      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12514
12515      # Check if we try to supply an empty value
12516      if test "x$AWK" = x; then
12517        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12518$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12519        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12520$as_echo_n "checking for AWK... " >&6; }
12521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12522$as_echo "disabled" >&6; }
12523      else
12524        # Check if the provided tool contains a complete path.
12525        tool_specified="$AWK"
12526        tool_basename="${tool_specified##*/}"
12527        if test "x$tool_basename" = "x$tool_specified"; then
12528          # A command without a complete path is provided, search $PATH.
12529          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12530$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12531          # Extract the first word of "$tool_basename", so it can be a program name with args.
12532set dummy $tool_basename; ac_word=$2
12533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12534$as_echo_n "checking for $ac_word... " >&6; }
12535if ${ac_cv_path_AWK+:} false; then :
12536  $as_echo_n "(cached) " >&6
12537else
12538  case $AWK in
12539  [\\/]* | ?:[\\/]*)
12540  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12541  ;;
12542  *)
12543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12544for as_dir in $PATH
12545do
12546  IFS=$as_save_IFS
12547  test -z "$as_dir" && as_dir=.
12548    for ac_exec_ext in '' $ac_executable_extensions; do
12549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12550    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12552    break 2
12553  fi
12554done
12555  done
12556IFS=$as_save_IFS
12557
12558  ;;
12559esac
12560fi
12561AWK=$ac_cv_path_AWK
12562if test -n "$AWK"; then
12563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12564$as_echo "$AWK" >&6; }
12565else
12566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12567$as_echo "no" >&6; }
12568fi
12569
12570
12571          if test "x$AWK" = x; then
12572            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12573          fi
12574        else
12575          # Otherwise we believe it is a complete path. Use it as it is.
12576          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12577$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12578          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12579$as_echo_n "checking for AWK... " >&6; }
12580          if test ! -x "$tool_specified"; then
12581            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12582$as_echo "not found" >&6; }
12583            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12584          fi
12585          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12586$as_echo "$tool_specified" >&6; }
12587        fi
12588      fi
12589    fi
12590
12591  fi
12592
12593
12594  if test "x$AWK" = x; then
12595    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12596  fi
12597
12598
12599
12600
12601  # Publish this variable in the help.
12602
12603
12604  if [ -z "${GREP+x}" ]; then
12605    # The variable is not set by user, try to locate tool using the code snippet
12606    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12607$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12608if ${ac_cv_path_GREP+:} false; then :
12609  $as_echo_n "(cached) " >&6
12610else
12611  if test -z "$GREP"; then
12612  ac_path_GREP_found=false
12613  # Loop through the user's path and test for each of PROGNAME-LIST
12614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12615for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12616do
12617  IFS=$as_save_IFS
12618  test -z "$as_dir" && as_dir=.
12619    for ac_prog in grep ggrep; do
12620    for ac_exec_ext in '' $ac_executable_extensions; do
12621      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12622      as_fn_executable_p "$ac_path_GREP" || continue
12623# Check for GNU ac_path_GREP and select it if it is found.
12624  # Check for GNU $ac_path_GREP
12625case `"$ac_path_GREP" --version 2>&1` in
12626*GNU*)
12627  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12628*)
12629  ac_count=0
12630  $as_echo_n 0123456789 >"conftest.in"
12631  while :
12632  do
12633    cat "conftest.in" "conftest.in" >"conftest.tmp"
12634    mv "conftest.tmp" "conftest.in"
12635    cp "conftest.in" "conftest.nl"
12636    $as_echo 'GREP' >> "conftest.nl"
12637    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12638    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12639    as_fn_arith $ac_count + 1 && ac_count=$as_val
12640    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12641      # Best one so far, save it but keep looking for a better one
12642      ac_cv_path_GREP="$ac_path_GREP"
12643      ac_path_GREP_max=$ac_count
12644    fi
12645    # 10*(2^10) chars as input seems more than enough
12646    test $ac_count -gt 10 && break
12647  done
12648  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12649esac
12650
12651      $ac_path_GREP_found && break 3
12652    done
12653  done
12654  done
12655IFS=$as_save_IFS
12656  if test -z "$ac_cv_path_GREP"; then
12657    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12658  fi
12659else
12660  ac_cv_path_GREP=$GREP
12661fi
12662
12663fi
12664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12665$as_echo "$ac_cv_path_GREP" >&6; }
12666 GREP="$ac_cv_path_GREP"
12667
12668
12669  else
12670    # The variable is set, but is it from the command line or the environment?
12671
12672    # Try to remove the string !GREP! from our list.
12673    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12674    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12675      # If it failed, the variable was not from the command line. Ignore it,
12676      # but warn the user (except for BASH, which is always set by the calling BASH).
12677      if test "xGREP" != xBASH; then
12678        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12679$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12680      fi
12681      # Try to locate tool using the code snippet
12682      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12683$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12684if ${ac_cv_path_GREP+:} false; then :
12685  $as_echo_n "(cached) " >&6
12686else
12687  if test -z "$GREP"; then
12688  ac_path_GREP_found=false
12689  # Loop through the user's path and test for each of PROGNAME-LIST
12690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12691for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12692do
12693  IFS=$as_save_IFS
12694  test -z "$as_dir" && as_dir=.
12695    for ac_prog in grep ggrep; do
12696    for ac_exec_ext in '' $ac_executable_extensions; do
12697      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12698      as_fn_executable_p "$ac_path_GREP" || continue
12699# Check for GNU ac_path_GREP and select it if it is found.
12700  # Check for GNU $ac_path_GREP
12701case `"$ac_path_GREP" --version 2>&1` in
12702*GNU*)
12703  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12704*)
12705  ac_count=0
12706  $as_echo_n 0123456789 >"conftest.in"
12707  while :
12708  do
12709    cat "conftest.in" "conftest.in" >"conftest.tmp"
12710    mv "conftest.tmp" "conftest.in"
12711    cp "conftest.in" "conftest.nl"
12712    $as_echo 'GREP' >> "conftest.nl"
12713    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12714    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12715    as_fn_arith $ac_count + 1 && ac_count=$as_val
12716    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12717      # Best one so far, save it but keep looking for a better one
12718      ac_cv_path_GREP="$ac_path_GREP"
12719      ac_path_GREP_max=$ac_count
12720    fi
12721    # 10*(2^10) chars as input seems more than enough
12722    test $ac_count -gt 10 && break
12723  done
12724  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12725esac
12726
12727      $ac_path_GREP_found && break 3
12728    done
12729  done
12730  done
12731IFS=$as_save_IFS
12732  if test -z "$ac_cv_path_GREP"; then
12733    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12734  fi
12735else
12736  ac_cv_path_GREP=$GREP
12737fi
12738
12739fi
12740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12741$as_echo "$ac_cv_path_GREP" >&6; }
12742 GREP="$ac_cv_path_GREP"
12743
12744
12745    else
12746      # If it succeeded, then it was overridden by the user. We will use it
12747      # for the tool.
12748
12749      # First remove it from the list of overridden variables, so we can test
12750      # for unknown variables in the end.
12751      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12752
12753      # Check if we try to supply an empty value
12754      if test "x$GREP" = x; then
12755        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12756$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12757        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12758$as_echo_n "checking for GREP... " >&6; }
12759        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12760$as_echo "disabled" >&6; }
12761      else
12762        # Check if the provided tool contains a complete path.
12763        tool_specified="$GREP"
12764        tool_basename="${tool_specified##*/}"
12765        if test "x$tool_basename" = "x$tool_specified"; then
12766          # A command without a complete path is provided, search $PATH.
12767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12768$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12769          # Extract the first word of "$tool_basename", so it can be a program name with args.
12770set dummy $tool_basename; ac_word=$2
12771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12772$as_echo_n "checking for $ac_word... " >&6; }
12773if ${ac_cv_path_GREP+:} false; then :
12774  $as_echo_n "(cached) " >&6
12775else
12776  case $GREP in
12777  [\\/]* | ?:[\\/]*)
12778  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12779  ;;
12780  *)
12781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12782for as_dir in $PATH
12783do
12784  IFS=$as_save_IFS
12785  test -z "$as_dir" && as_dir=.
12786    for ac_exec_ext in '' $ac_executable_extensions; do
12787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12788    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12790    break 2
12791  fi
12792done
12793  done
12794IFS=$as_save_IFS
12795
12796  ;;
12797esac
12798fi
12799GREP=$ac_cv_path_GREP
12800if test -n "$GREP"; then
12801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12802$as_echo "$GREP" >&6; }
12803else
12804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12805$as_echo "no" >&6; }
12806fi
12807
12808
12809          if test "x$GREP" = x; then
12810            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12811          fi
12812        else
12813          # Otherwise we believe it is a complete path. Use it as it is.
12814          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12815$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12816          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12817$as_echo_n "checking for GREP... " >&6; }
12818          if test ! -x "$tool_specified"; then
12819            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12820$as_echo "not found" >&6; }
12821            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12822          fi
12823          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12824$as_echo "$tool_specified" >&6; }
12825        fi
12826      fi
12827    fi
12828
12829  fi
12830
12831
12832  if test "x$GREP" = x; then
12833    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12834  fi
12835
12836
12837
12838
12839  # Publish this variable in the help.
12840
12841
12842  if [ -z "${EGREP+x}" ]; then
12843    # The variable is not set by user, try to locate tool using the code snippet
12844    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12845$as_echo_n "checking for egrep... " >&6; }
12846if ${ac_cv_path_EGREP+:} false; then :
12847  $as_echo_n "(cached) " >&6
12848else
12849  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12850   then ac_cv_path_EGREP="$GREP -E"
12851   else
12852     if test -z "$EGREP"; then
12853  ac_path_EGREP_found=false
12854  # Loop through the user's path and test for each of PROGNAME-LIST
12855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12856for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12857do
12858  IFS=$as_save_IFS
12859  test -z "$as_dir" && as_dir=.
12860    for ac_prog in egrep; do
12861    for ac_exec_ext in '' $ac_executable_extensions; do
12862      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12863      as_fn_executable_p "$ac_path_EGREP" || continue
12864# Check for GNU ac_path_EGREP and select it if it is found.
12865  # Check for GNU $ac_path_EGREP
12866case `"$ac_path_EGREP" --version 2>&1` in
12867*GNU*)
12868  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12869*)
12870  ac_count=0
12871  $as_echo_n 0123456789 >"conftest.in"
12872  while :
12873  do
12874    cat "conftest.in" "conftest.in" >"conftest.tmp"
12875    mv "conftest.tmp" "conftest.in"
12876    cp "conftest.in" "conftest.nl"
12877    $as_echo 'EGREP' >> "conftest.nl"
12878    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12879    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12880    as_fn_arith $ac_count + 1 && ac_count=$as_val
12881    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12882      # Best one so far, save it but keep looking for a better one
12883      ac_cv_path_EGREP="$ac_path_EGREP"
12884      ac_path_EGREP_max=$ac_count
12885    fi
12886    # 10*(2^10) chars as input seems more than enough
12887    test $ac_count -gt 10 && break
12888  done
12889  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12890esac
12891
12892      $ac_path_EGREP_found && break 3
12893    done
12894  done
12895  done
12896IFS=$as_save_IFS
12897  if test -z "$ac_cv_path_EGREP"; then
12898    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12899  fi
12900else
12901  ac_cv_path_EGREP=$EGREP
12902fi
12903
12904   fi
12905fi
12906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12907$as_echo "$ac_cv_path_EGREP" >&6; }
12908 EGREP="$ac_cv_path_EGREP"
12909
12910
12911  else
12912    # The variable is set, but is it from the command line or the environment?
12913
12914    # Try to remove the string !EGREP! from our list.
12915    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12916    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12917      # If it failed, the variable was not from the command line. Ignore it,
12918      # but warn the user (except for BASH, which is always set by the calling BASH).
12919      if test "xEGREP" != xBASH; then
12920        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12921$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12922      fi
12923      # Try to locate tool using the code snippet
12924      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12925$as_echo_n "checking for egrep... " >&6; }
12926if ${ac_cv_path_EGREP+:} false; then :
12927  $as_echo_n "(cached) " >&6
12928else
12929  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12930   then ac_cv_path_EGREP="$GREP -E"
12931   else
12932     if test -z "$EGREP"; then
12933  ac_path_EGREP_found=false
12934  # Loop through the user's path and test for each of PROGNAME-LIST
12935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12936for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12937do
12938  IFS=$as_save_IFS
12939  test -z "$as_dir" && as_dir=.
12940    for ac_prog in egrep; do
12941    for ac_exec_ext in '' $ac_executable_extensions; do
12942      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12943      as_fn_executable_p "$ac_path_EGREP" || continue
12944# Check for GNU ac_path_EGREP and select it if it is found.
12945  # Check for GNU $ac_path_EGREP
12946case `"$ac_path_EGREP" --version 2>&1` in
12947*GNU*)
12948  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12949*)
12950  ac_count=0
12951  $as_echo_n 0123456789 >"conftest.in"
12952  while :
12953  do
12954    cat "conftest.in" "conftest.in" >"conftest.tmp"
12955    mv "conftest.tmp" "conftest.in"
12956    cp "conftest.in" "conftest.nl"
12957    $as_echo 'EGREP' >> "conftest.nl"
12958    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12959    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12960    as_fn_arith $ac_count + 1 && ac_count=$as_val
12961    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12962      # Best one so far, save it but keep looking for a better one
12963      ac_cv_path_EGREP="$ac_path_EGREP"
12964      ac_path_EGREP_max=$ac_count
12965    fi
12966    # 10*(2^10) chars as input seems more than enough
12967    test $ac_count -gt 10 && break
12968  done
12969  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12970esac
12971
12972      $ac_path_EGREP_found && break 3
12973    done
12974  done
12975  done
12976IFS=$as_save_IFS
12977  if test -z "$ac_cv_path_EGREP"; then
12978    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12979  fi
12980else
12981  ac_cv_path_EGREP=$EGREP
12982fi
12983
12984   fi
12985fi
12986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12987$as_echo "$ac_cv_path_EGREP" >&6; }
12988 EGREP="$ac_cv_path_EGREP"
12989
12990
12991    else
12992      # If it succeeded, then it was overridden by the user. We will use it
12993      # for the tool.
12994
12995      # First remove it from the list of overridden variables, so we can test
12996      # for unknown variables in the end.
12997      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12998
12999      # Check if we try to supply an empty value
13000      if test "x$EGREP" = x; then
13001        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13002$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13003        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13004$as_echo_n "checking for EGREP... " >&6; }
13005        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13006$as_echo "disabled" >&6; }
13007      else
13008        # Check if the provided tool contains a complete path.
13009        tool_specified="$EGREP"
13010        tool_basename="${tool_specified##*/}"
13011        if test "x$tool_basename" = "x$tool_specified"; then
13012          # A command without a complete path is provided, search $PATH.
13013          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13014$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13015          # Extract the first word of "$tool_basename", so it can be a program name with args.
13016set dummy $tool_basename; ac_word=$2
13017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13018$as_echo_n "checking for $ac_word... " >&6; }
13019if ${ac_cv_path_EGREP+:} false; then :
13020  $as_echo_n "(cached) " >&6
13021else
13022  case $EGREP in
13023  [\\/]* | ?:[\\/]*)
13024  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13025  ;;
13026  *)
13027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13028for as_dir in $PATH
13029do
13030  IFS=$as_save_IFS
13031  test -z "$as_dir" && as_dir=.
13032    for ac_exec_ext in '' $ac_executable_extensions; do
13033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13034    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13036    break 2
13037  fi
13038done
13039  done
13040IFS=$as_save_IFS
13041
13042  ;;
13043esac
13044fi
13045EGREP=$ac_cv_path_EGREP
13046if test -n "$EGREP"; then
13047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13048$as_echo "$EGREP" >&6; }
13049else
13050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13051$as_echo "no" >&6; }
13052fi
13053
13054
13055          if test "x$EGREP" = x; then
13056            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13057          fi
13058        else
13059          # Otherwise we believe it is a complete path. Use it as it is.
13060          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13061$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13062          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13063$as_echo_n "checking for EGREP... " >&6; }
13064          if test ! -x "$tool_specified"; then
13065            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13066$as_echo "not found" >&6; }
13067            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13068          fi
13069          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13070$as_echo "$tool_specified" >&6; }
13071        fi
13072      fi
13073    fi
13074
13075  fi
13076
13077
13078  if test "x$EGREP" = x; then
13079    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13080  fi
13081
13082
13083
13084
13085  # Publish this variable in the help.
13086
13087
13088  if [ -z "${FGREP+x}" ]; then
13089    # The variable is not set by user, try to locate tool using the code snippet
13090    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13091$as_echo_n "checking for fgrep... " >&6; }
13092if ${ac_cv_path_FGREP+:} false; then :
13093  $as_echo_n "(cached) " >&6
13094else
13095  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13096   then ac_cv_path_FGREP="$GREP -F"
13097   else
13098     if test -z "$FGREP"; then
13099  ac_path_FGREP_found=false
13100  # Loop through the user's path and test for each of PROGNAME-LIST
13101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13102for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13103do
13104  IFS=$as_save_IFS
13105  test -z "$as_dir" && as_dir=.
13106    for ac_prog in fgrep; do
13107    for ac_exec_ext in '' $ac_executable_extensions; do
13108      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13109      as_fn_executable_p "$ac_path_FGREP" || continue
13110# Check for GNU ac_path_FGREP and select it if it is found.
13111  # Check for GNU $ac_path_FGREP
13112case `"$ac_path_FGREP" --version 2>&1` in
13113*GNU*)
13114  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13115*)
13116  ac_count=0
13117  $as_echo_n 0123456789 >"conftest.in"
13118  while :
13119  do
13120    cat "conftest.in" "conftest.in" >"conftest.tmp"
13121    mv "conftest.tmp" "conftest.in"
13122    cp "conftest.in" "conftest.nl"
13123    $as_echo 'FGREP' >> "conftest.nl"
13124    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13125    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13126    as_fn_arith $ac_count + 1 && ac_count=$as_val
13127    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13128      # Best one so far, save it but keep looking for a better one
13129      ac_cv_path_FGREP="$ac_path_FGREP"
13130      ac_path_FGREP_max=$ac_count
13131    fi
13132    # 10*(2^10) chars as input seems more than enough
13133    test $ac_count -gt 10 && break
13134  done
13135  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13136esac
13137
13138      $ac_path_FGREP_found && break 3
13139    done
13140  done
13141  done
13142IFS=$as_save_IFS
13143  if test -z "$ac_cv_path_FGREP"; then
13144    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13145  fi
13146else
13147  ac_cv_path_FGREP=$FGREP
13148fi
13149
13150   fi
13151fi
13152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13153$as_echo "$ac_cv_path_FGREP" >&6; }
13154 FGREP="$ac_cv_path_FGREP"
13155
13156
13157  else
13158    # The variable is set, but is it from the command line or the environment?
13159
13160    # Try to remove the string !FGREP! from our list.
13161    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13162    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13163      # If it failed, the variable was not from the command line. Ignore it,
13164      # but warn the user (except for BASH, which is always set by the calling BASH).
13165      if test "xFGREP" != xBASH; then
13166        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13167$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13168      fi
13169      # Try to locate tool using the code snippet
13170      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13171$as_echo_n "checking for fgrep... " >&6; }
13172if ${ac_cv_path_FGREP+:} false; then :
13173  $as_echo_n "(cached) " >&6
13174else
13175  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13176   then ac_cv_path_FGREP="$GREP -F"
13177   else
13178     if test -z "$FGREP"; then
13179  ac_path_FGREP_found=false
13180  # Loop through the user's path and test for each of PROGNAME-LIST
13181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13182for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13183do
13184  IFS=$as_save_IFS
13185  test -z "$as_dir" && as_dir=.
13186    for ac_prog in fgrep; do
13187    for ac_exec_ext in '' $ac_executable_extensions; do
13188      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13189      as_fn_executable_p "$ac_path_FGREP" || continue
13190# Check for GNU ac_path_FGREP and select it if it is found.
13191  # Check for GNU $ac_path_FGREP
13192case `"$ac_path_FGREP" --version 2>&1` in
13193*GNU*)
13194  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13195*)
13196  ac_count=0
13197  $as_echo_n 0123456789 >"conftest.in"
13198  while :
13199  do
13200    cat "conftest.in" "conftest.in" >"conftest.tmp"
13201    mv "conftest.tmp" "conftest.in"
13202    cp "conftest.in" "conftest.nl"
13203    $as_echo 'FGREP' >> "conftest.nl"
13204    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13205    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13206    as_fn_arith $ac_count + 1 && ac_count=$as_val
13207    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13208      # Best one so far, save it but keep looking for a better one
13209      ac_cv_path_FGREP="$ac_path_FGREP"
13210      ac_path_FGREP_max=$ac_count
13211    fi
13212    # 10*(2^10) chars as input seems more than enough
13213    test $ac_count -gt 10 && break
13214  done
13215  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13216esac
13217
13218      $ac_path_FGREP_found && break 3
13219    done
13220  done
13221  done
13222IFS=$as_save_IFS
13223  if test -z "$ac_cv_path_FGREP"; then
13224    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13225  fi
13226else
13227  ac_cv_path_FGREP=$FGREP
13228fi
13229
13230   fi
13231fi
13232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13233$as_echo "$ac_cv_path_FGREP" >&6; }
13234 FGREP="$ac_cv_path_FGREP"
13235
13236
13237    else
13238      # If it succeeded, then it was overridden by the user. We will use it
13239      # for the tool.
13240
13241      # First remove it from the list of overridden variables, so we can test
13242      # for unknown variables in the end.
13243      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13244
13245      # Check if we try to supply an empty value
13246      if test "x$FGREP" = x; then
13247        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13248$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13249        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13250$as_echo_n "checking for FGREP... " >&6; }
13251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13252$as_echo "disabled" >&6; }
13253      else
13254        # Check if the provided tool contains a complete path.
13255        tool_specified="$FGREP"
13256        tool_basename="${tool_specified##*/}"
13257        if test "x$tool_basename" = "x$tool_specified"; then
13258          # A command without a complete path is provided, search $PATH.
13259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13260$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13261          # Extract the first word of "$tool_basename", so it can be a program name with args.
13262set dummy $tool_basename; ac_word=$2
13263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13264$as_echo_n "checking for $ac_word... " >&6; }
13265if ${ac_cv_path_FGREP+:} false; then :
13266  $as_echo_n "(cached) " >&6
13267else
13268  case $FGREP in
13269  [\\/]* | ?:[\\/]*)
13270  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13271  ;;
13272  *)
13273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13274for as_dir in $PATH
13275do
13276  IFS=$as_save_IFS
13277  test -z "$as_dir" && as_dir=.
13278    for ac_exec_ext in '' $ac_executable_extensions; do
13279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13280    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13282    break 2
13283  fi
13284done
13285  done
13286IFS=$as_save_IFS
13287
13288  ;;
13289esac
13290fi
13291FGREP=$ac_cv_path_FGREP
13292if test -n "$FGREP"; then
13293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13294$as_echo "$FGREP" >&6; }
13295else
13296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13297$as_echo "no" >&6; }
13298fi
13299
13300
13301          if test "x$FGREP" = x; then
13302            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13303          fi
13304        else
13305          # Otherwise we believe it is a complete path. Use it as it is.
13306          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13307$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13308          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13309$as_echo_n "checking for FGREP... " >&6; }
13310          if test ! -x "$tool_specified"; then
13311            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13312$as_echo "not found" >&6; }
13313            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13314          fi
13315          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13316$as_echo "$tool_specified" >&6; }
13317        fi
13318      fi
13319    fi
13320
13321  fi
13322
13323
13324  if test "x$FGREP" = x; then
13325    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13326  fi
13327
13328
13329
13330
13331  # Publish this variable in the help.
13332
13333
13334  if [ -z "${SED+x}" ]; then
13335    # The variable is not set by user, try to locate tool using the code snippet
13336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13337$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13338if ${ac_cv_path_SED+:} false; then :
13339  $as_echo_n "(cached) " >&6
13340else
13341            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13342     for ac_i in 1 2 3 4 5 6 7; do
13343       ac_script="$ac_script$as_nl$ac_script"
13344     done
13345     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13346     { ac_script=; unset ac_script;}
13347     if test -z "$SED"; then
13348  ac_path_SED_found=false
13349  # Loop through the user's path and test for each of PROGNAME-LIST
13350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13351for as_dir in $PATH
13352do
13353  IFS=$as_save_IFS
13354  test -z "$as_dir" && as_dir=.
13355    for ac_prog in sed gsed; do
13356    for ac_exec_ext in '' $ac_executable_extensions; do
13357      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13358      as_fn_executable_p "$ac_path_SED" || continue
13359# Check for GNU ac_path_SED and select it if it is found.
13360  # Check for GNU $ac_path_SED
13361case `"$ac_path_SED" --version 2>&1` in
13362*GNU*)
13363  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13364*)
13365  ac_count=0
13366  $as_echo_n 0123456789 >"conftest.in"
13367  while :
13368  do
13369    cat "conftest.in" "conftest.in" >"conftest.tmp"
13370    mv "conftest.tmp" "conftest.in"
13371    cp "conftest.in" "conftest.nl"
13372    $as_echo '' >> "conftest.nl"
13373    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13374    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13375    as_fn_arith $ac_count + 1 && ac_count=$as_val
13376    if test $ac_count -gt ${ac_path_SED_max-0}; then
13377      # Best one so far, save it but keep looking for a better one
13378      ac_cv_path_SED="$ac_path_SED"
13379      ac_path_SED_max=$ac_count
13380    fi
13381    # 10*(2^10) chars as input seems more than enough
13382    test $ac_count -gt 10 && break
13383  done
13384  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13385esac
13386
13387      $ac_path_SED_found && break 3
13388    done
13389  done
13390  done
13391IFS=$as_save_IFS
13392  if test -z "$ac_cv_path_SED"; then
13393    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13394  fi
13395else
13396  ac_cv_path_SED=$SED
13397fi
13398
13399fi
13400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13401$as_echo "$ac_cv_path_SED" >&6; }
13402 SED="$ac_cv_path_SED"
13403  rm -f conftest.sed
13404
13405  else
13406    # The variable is set, but is it from the command line or the environment?
13407
13408    # Try to remove the string !SED! from our list.
13409    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13410    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13411      # If it failed, the variable was not from the command line. Ignore it,
13412      # but warn the user (except for BASH, which is always set by the calling BASH).
13413      if test "xSED" != xBASH; then
13414        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13415$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13416      fi
13417      # Try to locate tool using the code snippet
13418      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13419$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13420if ${ac_cv_path_SED+:} false; then :
13421  $as_echo_n "(cached) " >&6
13422else
13423            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13424     for ac_i in 1 2 3 4 5 6 7; do
13425       ac_script="$ac_script$as_nl$ac_script"
13426     done
13427     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13428     { ac_script=; unset ac_script;}
13429     if test -z "$SED"; then
13430  ac_path_SED_found=false
13431  # Loop through the user's path and test for each of PROGNAME-LIST
13432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13433for as_dir in $PATH
13434do
13435  IFS=$as_save_IFS
13436  test -z "$as_dir" && as_dir=.
13437    for ac_prog in sed gsed; do
13438    for ac_exec_ext in '' $ac_executable_extensions; do
13439      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13440      as_fn_executable_p "$ac_path_SED" || continue
13441# Check for GNU ac_path_SED and select it if it is found.
13442  # Check for GNU $ac_path_SED
13443case `"$ac_path_SED" --version 2>&1` in
13444*GNU*)
13445  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13446*)
13447  ac_count=0
13448  $as_echo_n 0123456789 >"conftest.in"
13449  while :
13450  do
13451    cat "conftest.in" "conftest.in" >"conftest.tmp"
13452    mv "conftest.tmp" "conftest.in"
13453    cp "conftest.in" "conftest.nl"
13454    $as_echo '' >> "conftest.nl"
13455    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13456    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13457    as_fn_arith $ac_count + 1 && ac_count=$as_val
13458    if test $ac_count -gt ${ac_path_SED_max-0}; then
13459      # Best one so far, save it but keep looking for a better one
13460      ac_cv_path_SED="$ac_path_SED"
13461      ac_path_SED_max=$ac_count
13462    fi
13463    # 10*(2^10) chars as input seems more than enough
13464    test $ac_count -gt 10 && break
13465  done
13466  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13467esac
13468
13469      $ac_path_SED_found && break 3
13470    done
13471  done
13472  done
13473IFS=$as_save_IFS
13474  if test -z "$ac_cv_path_SED"; then
13475    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13476  fi
13477else
13478  ac_cv_path_SED=$SED
13479fi
13480
13481fi
13482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13483$as_echo "$ac_cv_path_SED" >&6; }
13484 SED="$ac_cv_path_SED"
13485  rm -f conftest.sed
13486
13487    else
13488      # If it succeeded, then it was overridden by the user. We will use it
13489      # for the tool.
13490
13491      # First remove it from the list of overridden variables, so we can test
13492      # for unknown variables in the end.
13493      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13494
13495      # Check if we try to supply an empty value
13496      if test "x$SED" = x; then
13497        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13498$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13499        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13500$as_echo_n "checking for SED... " >&6; }
13501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13502$as_echo "disabled" >&6; }
13503      else
13504        # Check if the provided tool contains a complete path.
13505        tool_specified="$SED"
13506        tool_basename="${tool_specified##*/}"
13507        if test "x$tool_basename" = "x$tool_specified"; then
13508          # A command without a complete path is provided, search $PATH.
13509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13510$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13511          # Extract the first word of "$tool_basename", so it can be a program name with args.
13512set dummy $tool_basename; ac_word=$2
13513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13514$as_echo_n "checking for $ac_word... " >&6; }
13515if ${ac_cv_path_SED+:} false; then :
13516  $as_echo_n "(cached) " >&6
13517else
13518  case $SED in
13519  [\\/]* | ?:[\\/]*)
13520  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13521  ;;
13522  *)
13523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13524for as_dir in $PATH
13525do
13526  IFS=$as_save_IFS
13527  test -z "$as_dir" && as_dir=.
13528    for ac_exec_ext in '' $ac_executable_extensions; do
13529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13530    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13532    break 2
13533  fi
13534done
13535  done
13536IFS=$as_save_IFS
13537
13538  ;;
13539esac
13540fi
13541SED=$ac_cv_path_SED
13542if test -n "$SED"; then
13543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13544$as_echo "$SED" >&6; }
13545else
13546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13547$as_echo "no" >&6; }
13548fi
13549
13550
13551          if test "x$SED" = x; then
13552            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13553          fi
13554        else
13555          # Otherwise we believe it is a complete path. Use it as it is.
13556          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13557$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13558          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13559$as_echo_n "checking for SED... " >&6; }
13560          if test ! -x "$tool_specified"; then
13561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13562$as_echo "not found" >&6; }
13563            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13564          fi
13565          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13566$as_echo "$tool_specified" >&6; }
13567        fi
13568      fi
13569    fi
13570
13571  fi
13572
13573
13574  if test "x$SED" = x; then
13575    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13576  fi
13577
13578
13579
13580  # Always force rm.
13581  RM="$RM -f"
13582
13583  # pwd behaves differently on various platforms and some don't support the -L flag.
13584  # Always use the bash builtin pwd to get uniform behavior.
13585  THEPWDCMD=pwd
13586
13587  # These are not required on all platforms
13588
13589
13590  # Publish this variable in the help.
13591
13592
13593  if [ -z "${CYGPATH+x}" ]; then
13594    # The variable is not set by user, try to locate tool using the code snippet
13595    for ac_prog in cygpath
13596do
13597  # Extract the first word of "$ac_prog", so it can be a program name with args.
13598set dummy $ac_prog; ac_word=$2
13599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13600$as_echo_n "checking for $ac_word... " >&6; }
13601if ${ac_cv_path_CYGPATH+:} false; then :
13602  $as_echo_n "(cached) " >&6
13603else
13604  case $CYGPATH in
13605  [\\/]* | ?:[\\/]*)
13606  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13607  ;;
13608  *)
13609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13610for as_dir in $PATH
13611do
13612  IFS=$as_save_IFS
13613  test -z "$as_dir" && as_dir=.
13614    for ac_exec_ext in '' $ac_executable_extensions; do
13615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13616    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13618    break 2
13619  fi
13620done
13621  done
13622IFS=$as_save_IFS
13623
13624  ;;
13625esac
13626fi
13627CYGPATH=$ac_cv_path_CYGPATH
13628if test -n "$CYGPATH"; then
13629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13630$as_echo "$CYGPATH" >&6; }
13631else
13632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13633$as_echo "no" >&6; }
13634fi
13635
13636
13637  test -n "$CYGPATH" && break
13638done
13639
13640  else
13641    # The variable is set, but is it from the command line or the environment?
13642
13643    # Try to remove the string !CYGPATH! from our list.
13644    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13645    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13646      # If it failed, the variable was not from the command line. Ignore it,
13647      # but warn the user (except for BASH, which is always set by the calling BASH).
13648      if test "xCYGPATH" != xBASH; then
13649        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13650$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13651      fi
13652      # Try to locate tool using the code snippet
13653      for ac_prog in cygpath
13654do
13655  # Extract the first word of "$ac_prog", so it can be a program name with args.
13656set dummy $ac_prog; ac_word=$2
13657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13658$as_echo_n "checking for $ac_word... " >&6; }
13659if ${ac_cv_path_CYGPATH+:} false; then :
13660  $as_echo_n "(cached) " >&6
13661else
13662  case $CYGPATH in
13663  [\\/]* | ?:[\\/]*)
13664  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13665  ;;
13666  *)
13667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13668for as_dir in $PATH
13669do
13670  IFS=$as_save_IFS
13671  test -z "$as_dir" && as_dir=.
13672    for ac_exec_ext in '' $ac_executable_extensions; do
13673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13674    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13676    break 2
13677  fi
13678done
13679  done
13680IFS=$as_save_IFS
13681
13682  ;;
13683esac
13684fi
13685CYGPATH=$ac_cv_path_CYGPATH
13686if test -n "$CYGPATH"; then
13687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13688$as_echo "$CYGPATH" >&6; }
13689else
13690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13691$as_echo "no" >&6; }
13692fi
13693
13694
13695  test -n "$CYGPATH" && break
13696done
13697
13698    else
13699      # If it succeeded, then it was overridden by the user. We will use it
13700      # for the tool.
13701
13702      # First remove it from the list of overridden variables, so we can test
13703      # for unknown variables in the end.
13704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13705
13706      # Check if we try to supply an empty value
13707      if test "x$CYGPATH" = x; then
13708        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13709$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13710        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13711$as_echo_n "checking for CYGPATH... " >&6; }
13712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13713$as_echo "disabled" >&6; }
13714      else
13715        # Check if the provided tool contains a complete path.
13716        tool_specified="$CYGPATH"
13717        tool_basename="${tool_specified##*/}"
13718        if test "x$tool_basename" = "x$tool_specified"; then
13719          # A command without a complete path is provided, search $PATH.
13720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13721$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13722          # Extract the first word of "$tool_basename", so it can be a program name with args.
13723set dummy $tool_basename; ac_word=$2
13724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13725$as_echo_n "checking for $ac_word... " >&6; }
13726if ${ac_cv_path_CYGPATH+:} false; then :
13727  $as_echo_n "(cached) " >&6
13728else
13729  case $CYGPATH in
13730  [\\/]* | ?:[\\/]*)
13731  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13732  ;;
13733  *)
13734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13735for as_dir in $PATH
13736do
13737  IFS=$as_save_IFS
13738  test -z "$as_dir" && as_dir=.
13739    for ac_exec_ext in '' $ac_executable_extensions; do
13740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13741    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13743    break 2
13744  fi
13745done
13746  done
13747IFS=$as_save_IFS
13748
13749  ;;
13750esac
13751fi
13752CYGPATH=$ac_cv_path_CYGPATH
13753if test -n "$CYGPATH"; then
13754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13755$as_echo "$CYGPATH" >&6; }
13756else
13757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13758$as_echo "no" >&6; }
13759fi
13760
13761
13762          if test "x$CYGPATH" = x; then
13763            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13764          fi
13765        else
13766          # Otherwise we believe it is a complete path. Use it as it is.
13767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13768$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13769          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13770$as_echo_n "checking for CYGPATH... " >&6; }
13771          if test ! -x "$tool_specified"; then
13772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13773$as_echo "not found" >&6; }
13774            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13775          fi
13776          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13777$as_echo "$tool_specified" >&6; }
13778        fi
13779      fi
13780    fi
13781
13782  fi
13783
13784
13785
13786
13787  # Publish this variable in the help.
13788
13789
13790  if [ -z "${READLINK+x}" ]; then
13791    # The variable is not set by user, try to locate tool using the code snippet
13792    for ac_prog in greadlink readlink
13793do
13794  # Extract the first word of "$ac_prog", so it can be a program name with args.
13795set dummy $ac_prog; ac_word=$2
13796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13797$as_echo_n "checking for $ac_word... " >&6; }
13798if ${ac_cv_path_READLINK+:} false; then :
13799  $as_echo_n "(cached) " >&6
13800else
13801  case $READLINK in
13802  [\\/]* | ?:[\\/]*)
13803  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13804  ;;
13805  *)
13806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13807for as_dir in $PATH
13808do
13809  IFS=$as_save_IFS
13810  test -z "$as_dir" && as_dir=.
13811    for ac_exec_ext in '' $ac_executable_extensions; do
13812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13813    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13815    break 2
13816  fi
13817done
13818  done
13819IFS=$as_save_IFS
13820
13821  ;;
13822esac
13823fi
13824READLINK=$ac_cv_path_READLINK
13825if test -n "$READLINK"; then
13826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13827$as_echo "$READLINK" >&6; }
13828else
13829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13830$as_echo "no" >&6; }
13831fi
13832
13833
13834  test -n "$READLINK" && break
13835done
13836
13837  else
13838    # The variable is set, but is it from the command line or the environment?
13839
13840    # Try to remove the string !READLINK! from our list.
13841    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13842    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13843      # If it failed, the variable was not from the command line. Ignore it,
13844      # but warn the user (except for BASH, which is always set by the calling BASH).
13845      if test "xREADLINK" != xBASH; then
13846        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13847$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13848      fi
13849      # Try to locate tool using the code snippet
13850      for ac_prog in greadlink readlink
13851do
13852  # Extract the first word of "$ac_prog", so it can be a program name with args.
13853set dummy $ac_prog; ac_word=$2
13854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13855$as_echo_n "checking for $ac_word... " >&6; }
13856if ${ac_cv_path_READLINK+:} false; then :
13857  $as_echo_n "(cached) " >&6
13858else
13859  case $READLINK in
13860  [\\/]* | ?:[\\/]*)
13861  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13862  ;;
13863  *)
13864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13865for as_dir in $PATH
13866do
13867  IFS=$as_save_IFS
13868  test -z "$as_dir" && as_dir=.
13869    for ac_exec_ext in '' $ac_executable_extensions; do
13870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13871    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13873    break 2
13874  fi
13875done
13876  done
13877IFS=$as_save_IFS
13878
13879  ;;
13880esac
13881fi
13882READLINK=$ac_cv_path_READLINK
13883if test -n "$READLINK"; then
13884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13885$as_echo "$READLINK" >&6; }
13886else
13887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13888$as_echo "no" >&6; }
13889fi
13890
13891
13892  test -n "$READLINK" && break
13893done
13894
13895    else
13896      # If it succeeded, then it was overridden by the user. We will use it
13897      # for the tool.
13898
13899      # First remove it from the list of overridden variables, so we can test
13900      # for unknown variables in the end.
13901      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13902
13903      # Check if we try to supply an empty value
13904      if test "x$READLINK" = x; then
13905        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13906$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13908$as_echo_n "checking for READLINK... " >&6; }
13909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13910$as_echo "disabled" >&6; }
13911      else
13912        # Check if the provided tool contains a complete path.
13913        tool_specified="$READLINK"
13914        tool_basename="${tool_specified##*/}"
13915        if test "x$tool_basename" = "x$tool_specified"; then
13916          # A command without a complete path is provided, search $PATH.
13917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13918$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13919          # Extract the first word of "$tool_basename", so it can be a program name with args.
13920set dummy $tool_basename; ac_word=$2
13921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13922$as_echo_n "checking for $ac_word... " >&6; }
13923if ${ac_cv_path_READLINK+:} false; then :
13924  $as_echo_n "(cached) " >&6
13925else
13926  case $READLINK in
13927  [\\/]* | ?:[\\/]*)
13928  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13929  ;;
13930  *)
13931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13932for as_dir in $PATH
13933do
13934  IFS=$as_save_IFS
13935  test -z "$as_dir" && as_dir=.
13936    for ac_exec_ext in '' $ac_executable_extensions; do
13937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13938    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13940    break 2
13941  fi
13942done
13943  done
13944IFS=$as_save_IFS
13945
13946  ;;
13947esac
13948fi
13949READLINK=$ac_cv_path_READLINK
13950if test -n "$READLINK"; then
13951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13952$as_echo "$READLINK" >&6; }
13953else
13954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13955$as_echo "no" >&6; }
13956fi
13957
13958
13959          if test "x$READLINK" = x; then
13960            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13961          fi
13962        else
13963          # Otherwise we believe it is a complete path. Use it as it is.
13964          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13965$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13966          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13967$as_echo_n "checking for READLINK... " >&6; }
13968          if test ! -x "$tool_specified"; then
13969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13970$as_echo "not found" >&6; }
13971            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13972          fi
13973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13974$as_echo "$tool_specified" >&6; }
13975        fi
13976      fi
13977    fi
13978
13979  fi
13980
13981
13982
13983
13984  # Publish this variable in the help.
13985
13986
13987  if [ -z "${DF+x}" ]; then
13988    # The variable is not set by user, try to locate tool using the code snippet
13989    for ac_prog in df
13990do
13991  # Extract the first word of "$ac_prog", so it can be a program name with args.
13992set dummy $ac_prog; ac_word=$2
13993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13994$as_echo_n "checking for $ac_word... " >&6; }
13995if ${ac_cv_path_DF+:} false; then :
13996  $as_echo_n "(cached) " >&6
13997else
13998  case $DF in
13999  [\\/]* | ?:[\\/]*)
14000  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14001  ;;
14002  *)
14003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14004for as_dir in $PATH
14005do
14006  IFS=$as_save_IFS
14007  test -z "$as_dir" && as_dir=.
14008    for ac_exec_ext in '' $ac_executable_extensions; do
14009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14010    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14012    break 2
14013  fi
14014done
14015  done
14016IFS=$as_save_IFS
14017
14018  ;;
14019esac
14020fi
14021DF=$ac_cv_path_DF
14022if test -n "$DF"; then
14023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14024$as_echo "$DF" >&6; }
14025else
14026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14027$as_echo "no" >&6; }
14028fi
14029
14030
14031  test -n "$DF" && break
14032done
14033
14034  else
14035    # The variable is set, but is it from the command line or the environment?
14036
14037    # Try to remove the string !DF! from our list.
14038    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14039    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14040      # If it failed, the variable was not from the command line. Ignore it,
14041      # but warn the user (except for BASH, which is always set by the calling BASH).
14042      if test "xDF" != xBASH; then
14043        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14044$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14045      fi
14046      # Try to locate tool using the code snippet
14047      for ac_prog in df
14048do
14049  # Extract the first word of "$ac_prog", so it can be a program name with args.
14050set dummy $ac_prog; ac_word=$2
14051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14052$as_echo_n "checking for $ac_word... " >&6; }
14053if ${ac_cv_path_DF+:} false; then :
14054  $as_echo_n "(cached) " >&6
14055else
14056  case $DF in
14057  [\\/]* | ?:[\\/]*)
14058  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14059  ;;
14060  *)
14061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14062for as_dir in $PATH
14063do
14064  IFS=$as_save_IFS
14065  test -z "$as_dir" && as_dir=.
14066    for ac_exec_ext in '' $ac_executable_extensions; do
14067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14068    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14070    break 2
14071  fi
14072done
14073  done
14074IFS=$as_save_IFS
14075
14076  ;;
14077esac
14078fi
14079DF=$ac_cv_path_DF
14080if test -n "$DF"; then
14081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14082$as_echo "$DF" >&6; }
14083else
14084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14085$as_echo "no" >&6; }
14086fi
14087
14088
14089  test -n "$DF" && break
14090done
14091
14092    else
14093      # If it succeeded, then it was overridden by the user. We will use it
14094      # for the tool.
14095
14096      # First remove it from the list of overridden variables, so we can test
14097      # for unknown variables in the end.
14098      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14099
14100      # Check if we try to supply an empty value
14101      if test "x$DF" = x; then
14102        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14103$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14105$as_echo_n "checking for DF... " >&6; }
14106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14107$as_echo "disabled" >&6; }
14108      else
14109        # Check if the provided tool contains a complete path.
14110        tool_specified="$DF"
14111        tool_basename="${tool_specified##*/}"
14112        if test "x$tool_basename" = "x$tool_specified"; then
14113          # A command without a complete path is provided, search $PATH.
14114          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14115$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14116          # Extract the first word of "$tool_basename", so it can be a program name with args.
14117set dummy $tool_basename; ac_word=$2
14118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14119$as_echo_n "checking for $ac_word... " >&6; }
14120if ${ac_cv_path_DF+:} false; then :
14121  $as_echo_n "(cached) " >&6
14122else
14123  case $DF in
14124  [\\/]* | ?:[\\/]*)
14125  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14126  ;;
14127  *)
14128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14129for as_dir in $PATH
14130do
14131  IFS=$as_save_IFS
14132  test -z "$as_dir" && as_dir=.
14133    for ac_exec_ext in '' $ac_executable_extensions; do
14134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14135    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14137    break 2
14138  fi
14139done
14140  done
14141IFS=$as_save_IFS
14142
14143  ;;
14144esac
14145fi
14146DF=$ac_cv_path_DF
14147if test -n "$DF"; then
14148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14149$as_echo "$DF" >&6; }
14150else
14151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14152$as_echo "no" >&6; }
14153fi
14154
14155
14156          if test "x$DF" = x; then
14157            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14158          fi
14159        else
14160          # Otherwise we believe it is a complete path. Use it as it is.
14161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14162$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14163          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14164$as_echo_n "checking for DF... " >&6; }
14165          if test ! -x "$tool_specified"; then
14166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14167$as_echo "not found" >&6; }
14168            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14169          fi
14170          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14171$as_echo "$tool_specified" >&6; }
14172        fi
14173      fi
14174    fi
14175
14176  fi
14177
14178
14179
14180
14181  # Publish this variable in the help.
14182
14183
14184  if [ -z "${CPIO+x}" ]; then
14185    # The variable is not set by user, try to locate tool using the code snippet
14186    for ac_prog in cpio bsdcpio
14187do
14188  # Extract the first word of "$ac_prog", so it can be a program name with args.
14189set dummy $ac_prog; ac_word=$2
14190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14191$as_echo_n "checking for $ac_word... " >&6; }
14192if ${ac_cv_path_CPIO+:} false; then :
14193  $as_echo_n "(cached) " >&6
14194else
14195  case $CPIO in
14196  [\\/]* | ?:[\\/]*)
14197  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14198  ;;
14199  *)
14200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14201for as_dir in $PATH
14202do
14203  IFS=$as_save_IFS
14204  test -z "$as_dir" && as_dir=.
14205    for ac_exec_ext in '' $ac_executable_extensions; do
14206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14207    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14209    break 2
14210  fi
14211done
14212  done
14213IFS=$as_save_IFS
14214
14215  ;;
14216esac
14217fi
14218CPIO=$ac_cv_path_CPIO
14219if test -n "$CPIO"; then
14220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14221$as_echo "$CPIO" >&6; }
14222else
14223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14224$as_echo "no" >&6; }
14225fi
14226
14227
14228  test -n "$CPIO" && break
14229done
14230
14231  else
14232    # The variable is set, but is it from the command line or the environment?
14233
14234    # Try to remove the string !CPIO! from our list.
14235    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14236    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14237      # If it failed, the variable was not from the command line. Ignore it,
14238      # but warn the user (except for BASH, which is always set by the calling BASH).
14239      if test "xCPIO" != xBASH; then
14240        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14241$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14242      fi
14243      # Try to locate tool using the code snippet
14244      for ac_prog in cpio bsdcpio
14245do
14246  # Extract the first word of "$ac_prog", so it can be a program name with args.
14247set dummy $ac_prog; ac_word=$2
14248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14249$as_echo_n "checking for $ac_word... " >&6; }
14250if ${ac_cv_path_CPIO+:} false; then :
14251  $as_echo_n "(cached) " >&6
14252else
14253  case $CPIO in
14254  [\\/]* | ?:[\\/]*)
14255  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14256  ;;
14257  *)
14258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14259for as_dir in $PATH
14260do
14261  IFS=$as_save_IFS
14262  test -z "$as_dir" && as_dir=.
14263    for ac_exec_ext in '' $ac_executable_extensions; do
14264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14265    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14267    break 2
14268  fi
14269done
14270  done
14271IFS=$as_save_IFS
14272
14273  ;;
14274esac
14275fi
14276CPIO=$ac_cv_path_CPIO
14277if test -n "$CPIO"; then
14278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14279$as_echo "$CPIO" >&6; }
14280else
14281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14282$as_echo "no" >&6; }
14283fi
14284
14285
14286  test -n "$CPIO" && break
14287done
14288
14289    else
14290      # If it succeeded, then it was overridden by the user. We will use it
14291      # for the tool.
14292
14293      # First remove it from the list of overridden variables, so we can test
14294      # for unknown variables in the end.
14295      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14296
14297      # Check if we try to supply an empty value
14298      if test "x$CPIO" = x; then
14299        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14300$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14301        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14302$as_echo_n "checking for CPIO... " >&6; }
14303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14304$as_echo "disabled" >&6; }
14305      else
14306        # Check if the provided tool contains a complete path.
14307        tool_specified="$CPIO"
14308        tool_basename="${tool_specified##*/}"
14309        if test "x$tool_basename" = "x$tool_specified"; then
14310          # A command without a complete path is provided, search $PATH.
14311          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14312$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14313          # Extract the first word of "$tool_basename", so it can be a program name with args.
14314set dummy $tool_basename; ac_word=$2
14315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14316$as_echo_n "checking for $ac_word... " >&6; }
14317if ${ac_cv_path_CPIO+:} false; then :
14318  $as_echo_n "(cached) " >&6
14319else
14320  case $CPIO in
14321  [\\/]* | ?:[\\/]*)
14322  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14323  ;;
14324  *)
14325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14326for as_dir in $PATH
14327do
14328  IFS=$as_save_IFS
14329  test -z "$as_dir" && as_dir=.
14330    for ac_exec_ext in '' $ac_executable_extensions; do
14331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14332    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14334    break 2
14335  fi
14336done
14337  done
14338IFS=$as_save_IFS
14339
14340  ;;
14341esac
14342fi
14343CPIO=$ac_cv_path_CPIO
14344if test -n "$CPIO"; then
14345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14346$as_echo "$CPIO" >&6; }
14347else
14348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14349$as_echo "no" >&6; }
14350fi
14351
14352
14353          if test "x$CPIO" = x; then
14354            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14355          fi
14356        else
14357          # Otherwise we believe it is a complete path. Use it as it is.
14358          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14359$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14360          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14361$as_echo_n "checking for CPIO... " >&6; }
14362          if test ! -x "$tool_specified"; then
14363            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14364$as_echo "not found" >&6; }
14365            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14366          fi
14367          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14368$as_echo "$tool_specified" >&6; }
14369        fi
14370      fi
14371    fi
14372
14373  fi
14374
14375
14376
14377
14378  # Publish this variable in the help.
14379
14380
14381  if [ -z "${NICE+x}" ]; then
14382    # The variable is not set by user, try to locate tool using the code snippet
14383    for ac_prog in nice
14384do
14385  # Extract the first word of "$ac_prog", so it can be a program name with args.
14386set dummy $ac_prog; ac_word=$2
14387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14388$as_echo_n "checking for $ac_word... " >&6; }
14389if ${ac_cv_path_NICE+:} false; then :
14390  $as_echo_n "(cached) " >&6
14391else
14392  case $NICE in
14393  [\\/]* | ?:[\\/]*)
14394  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14395  ;;
14396  *)
14397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14398for as_dir in $PATH
14399do
14400  IFS=$as_save_IFS
14401  test -z "$as_dir" && as_dir=.
14402    for ac_exec_ext in '' $ac_executable_extensions; do
14403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14404    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14406    break 2
14407  fi
14408done
14409  done
14410IFS=$as_save_IFS
14411
14412  ;;
14413esac
14414fi
14415NICE=$ac_cv_path_NICE
14416if test -n "$NICE"; then
14417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14418$as_echo "$NICE" >&6; }
14419else
14420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14421$as_echo "no" >&6; }
14422fi
14423
14424
14425  test -n "$NICE" && break
14426done
14427
14428  else
14429    # The variable is set, but is it from the command line or the environment?
14430
14431    # Try to remove the string !NICE! from our list.
14432    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14433    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14434      # If it failed, the variable was not from the command line. Ignore it,
14435      # but warn the user (except for BASH, which is always set by the calling BASH).
14436      if test "xNICE" != xBASH; then
14437        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14438$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14439      fi
14440      # Try to locate tool using the code snippet
14441      for ac_prog in nice
14442do
14443  # Extract the first word of "$ac_prog", so it can be a program name with args.
14444set dummy $ac_prog; ac_word=$2
14445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14446$as_echo_n "checking for $ac_word... " >&6; }
14447if ${ac_cv_path_NICE+:} false; then :
14448  $as_echo_n "(cached) " >&6
14449else
14450  case $NICE in
14451  [\\/]* | ?:[\\/]*)
14452  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14453  ;;
14454  *)
14455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14456for as_dir in $PATH
14457do
14458  IFS=$as_save_IFS
14459  test -z "$as_dir" && as_dir=.
14460    for ac_exec_ext in '' $ac_executable_extensions; do
14461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14462    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14464    break 2
14465  fi
14466done
14467  done
14468IFS=$as_save_IFS
14469
14470  ;;
14471esac
14472fi
14473NICE=$ac_cv_path_NICE
14474if test -n "$NICE"; then
14475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14476$as_echo "$NICE" >&6; }
14477else
14478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14479$as_echo "no" >&6; }
14480fi
14481
14482
14483  test -n "$NICE" && break
14484done
14485
14486    else
14487      # If it succeeded, then it was overridden by the user. We will use it
14488      # for the tool.
14489
14490      # First remove it from the list of overridden variables, so we can test
14491      # for unknown variables in the end.
14492      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14493
14494      # Check if we try to supply an empty value
14495      if test "x$NICE" = x; then
14496        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14497$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14498        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14499$as_echo_n "checking for NICE... " >&6; }
14500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14501$as_echo "disabled" >&6; }
14502      else
14503        # Check if the provided tool contains a complete path.
14504        tool_specified="$NICE"
14505        tool_basename="${tool_specified##*/}"
14506        if test "x$tool_basename" = "x$tool_specified"; then
14507          # A command without a complete path is provided, search $PATH.
14508          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14509$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14510          # Extract the first word of "$tool_basename", so it can be a program name with args.
14511set dummy $tool_basename; ac_word=$2
14512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14513$as_echo_n "checking for $ac_word... " >&6; }
14514if ${ac_cv_path_NICE+:} false; then :
14515  $as_echo_n "(cached) " >&6
14516else
14517  case $NICE in
14518  [\\/]* | ?:[\\/]*)
14519  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14520  ;;
14521  *)
14522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14523for as_dir in $PATH
14524do
14525  IFS=$as_save_IFS
14526  test -z "$as_dir" && as_dir=.
14527    for ac_exec_ext in '' $ac_executable_extensions; do
14528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14529    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14531    break 2
14532  fi
14533done
14534  done
14535IFS=$as_save_IFS
14536
14537  ;;
14538esac
14539fi
14540NICE=$ac_cv_path_NICE
14541if test -n "$NICE"; then
14542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14543$as_echo "$NICE" >&6; }
14544else
14545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14546$as_echo "no" >&6; }
14547fi
14548
14549
14550          if test "x$NICE" = x; then
14551            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14552          fi
14553        else
14554          # Otherwise we believe it is a complete path. Use it as it is.
14555          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14556$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14557          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14558$as_echo_n "checking for NICE... " >&6; }
14559          if test ! -x "$tool_specified"; then
14560            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14561$as_echo "not found" >&6; }
14562            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14563          fi
14564          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14565$as_echo "$tool_specified" >&6; }
14566        fi
14567      fi
14568    fi
14569
14570  fi
14571
14572
14573
14574
14575# Now we can determine OpenJDK build and target platforms. This is required to
14576# have early on.
14577# Make sure we can run config.sub.
14578$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14579  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14580
14581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14582$as_echo_n "checking build system type... " >&6; }
14583if ${ac_cv_build+:} false; then :
14584  $as_echo_n "(cached) " >&6
14585else
14586  ac_build_alias=$build_alias
14587test "x$ac_build_alias" = x &&
14588  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14589test "x$ac_build_alias" = x &&
14590  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14591ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14592  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14593
14594fi
14595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14596$as_echo "$ac_cv_build" >&6; }
14597case $ac_cv_build in
14598*-*-*) ;;
14599*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14600esac
14601build=$ac_cv_build
14602ac_save_IFS=$IFS; IFS='-'
14603set x $ac_cv_build
14604shift
14605build_cpu=$1
14606build_vendor=$2
14607shift; shift
14608# Remember, the first character of IFS is used to create $*,
14609# except with old shells:
14610build_os=$*
14611IFS=$ac_save_IFS
14612case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14613
14614
14615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14616$as_echo_n "checking host system type... " >&6; }
14617if ${ac_cv_host+:} false; then :
14618  $as_echo_n "(cached) " >&6
14619else
14620  if test "x$host_alias" = x; then
14621  ac_cv_host=$ac_cv_build
14622else
14623  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14624    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14625fi
14626
14627fi
14628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14629$as_echo "$ac_cv_host" >&6; }
14630case $ac_cv_host in
14631*-*-*) ;;
14632*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14633esac
14634host=$ac_cv_host
14635ac_save_IFS=$IFS; IFS='-'
14636set x $ac_cv_host
14637shift
14638host_cpu=$1
14639host_vendor=$2
14640shift; shift
14641# Remember, the first character of IFS is used to create $*,
14642# except with old shells:
14643host_os=$*
14644IFS=$ac_save_IFS
14645case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14646
14647
14648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14649$as_echo_n "checking target system type... " >&6; }
14650if ${ac_cv_target+:} false; then :
14651  $as_echo_n "(cached) " >&6
14652else
14653  if test "x$target_alias" = x; then
14654  ac_cv_target=$ac_cv_host
14655else
14656  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14657    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14658fi
14659
14660fi
14661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14662$as_echo "$ac_cv_target" >&6; }
14663case $ac_cv_target in
14664*-*-*) ;;
14665*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14666esac
14667target=$ac_cv_target
14668ac_save_IFS=$IFS; IFS='-'
14669set x $ac_cv_target
14670shift
14671target_cpu=$1
14672target_vendor=$2
14673shift; shift
14674# Remember, the first character of IFS is used to create $*,
14675# except with old shells:
14676target_os=$*
14677IFS=$ac_save_IFS
14678case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14679
14680
14681# The aliases save the names the user supplied, while $host etc.
14682# will get canonicalized.
14683test -n "$target_alias" &&
14684  test "$program_prefix$program_suffix$program_transform_name" = \
14685    NONENONEs,x,x, &&
14686  program_prefix=${target_alias}-
14687
14688  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14689  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14690  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14691  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14692  # to use the configure naming style.
14693
14694
14695
14696
14697
14698  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14699  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14700  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14701  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14702  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14703  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14704
14705
14706
14707  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14708
14709  case "$build_os" in
14710    *linux*)
14711      VAR_OS=linux
14712      VAR_OS_TYPE=unix
14713      ;;
14714    *solaris*)
14715      VAR_OS=solaris
14716      VAR_OS_TYPE=unix
14717      ;;
14718    *darwin*)
14719      VAR_OS=macosx
14720      VAR_OS_TYPE=unix
14721      ;;
14722    *bsd*)
14723      VAR_OS=bsd
14724      VAR_OS_TYPE=unix
14725      ;;
14726    *cygwin*)
14727      VAR_OS=windows
14728      VAR_OS_ENV=windows.cygwin
14729      ;;
14730    *mingw*)
14731      VAR_OS=windows
14732      VAR_OS_ENV=windows.msys
14733      ;;
14734    *aix*)
14735      VAR_OS=aix
14736      VAR_OS_TYPE=unix
14737      ;;
14738    *)
14739      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14740      ;;
14741  esac
14742
14743
14744  # First argument is the cpu name from the trip/quad
14745  case "$build_cpu" in
14746    x86_64)
14747      VAR_CPU=x86_64
14748      VAR_CPU_ARCH=x86
14749      VAR_CPU_BITS=64
14750      VAR_CPU_ENDIAN=little
14751      ;;
14752    i?86)
14753      VAR_CPU=x86
14754      VAR_CPU_ARCH=x86
14755      VAR_CPU_BITS=32
14756      VAR_CPU_ENDIAN=little
14757      ;;
14758    arm*)
14759      VAR_CPU=arm
14760      VAR_CPU_ARCH=arm
14761      VAR_CPU_BITS=32
14762      VAR_CPU_ENDIAN=little
14763      ;;
14764    aarch64)
14765      VAR_CPU=aarch64
14766      VAR_CPU_ARCH=aarch64
14767      VAR_CPU_BITS=64
14768      VAR_CPU_ENDIAN=little
14769      ;;
14770    powerpc)
14771      VAR_CPU=ppc
14772      VAR_CPU_ARCH=ppc
14773      VAR_CPU_BITS=32
14774      VAR_CPU_ENDIAN=big
14775      ;;
14776    powerpc64)
14777      VAR_CPU=ppc64
14778      VAR_CPU_ARCH=ppc
14779      VAR_CPU_BITS=64
14780      VAR_CPU_ENDIAN=big
14781      ;;
14782    powerpc64le)
14783      VAR_CPU=ppc64
14784      VAR_CPU_ARCH=ppc
14785      VAR_CPU_BITS=64
14786      VAR_CPU_ENDIAN=little
14787      ;;
14788    s390)
14789      VAR_CPU=s390
14790      VAR_CPU_ARCH=s390
14791      VAR_CPU_BITS=32
14792      VAR_CPU_ENDIAN=big
14793      ;;
14794    s390x)
14795      VAR_CPU=s390x
14796      VAR_CPU_ARCH=s390
14797      VAR_CPU_BITS=64
14798      VAR_CPU_ENDIAN=big
14799      ;;
14800    sparc)
14801      VAR_CPU=sparc
14802      VAR_CPU_ARCH=sparc
14803      VAR_CPU_BITS=32
14804      VAR_CPU_ENDIAN=big
14805      ;;
14806    sparcv9|sparc64)
14807      VAR_CPU=sparcv9
14808      VAR_CPU_ARCH=sparc
14809      VAR_CPU_BITS=64
14810      VAR_CPU_ENDIAN=big
14811      ;;
14812    *)
14813      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14814      ;;
14815  esac
14816
14817  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14818  OPENJDK_BUILD_OS="$VAR_OS"
14819  if test "x$VAR_OS_TYPE" != x; then
14820    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14821  else
14822    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14823  fi
14824  if test "x$VAR_OS_ENV" != x; then
14825    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14826  else
14827    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14828  fi
14829  OPENJDK_BUILD_CPU="$VAR_CPU"
14830  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14831  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14832  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14833
14834
14835
14836
14837
14838
14839
14840
14841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14842$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14844$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14845
14846  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14847
14848  case "$host_os" in
14849    *linux*)
14850      VAR_OS=linux
14851      VAR_OS_TYPE=unix
14852      ;;
14853    *solaris*)
14854      VAR_OS=solaris
14855      VAR_OS_TYPE=unix
14856      ;;
14857    *darwin*)
14858      VAR_OS=macosx
14859      VAR_OS_TYPE=unix
14860      ;;
14861    *bsd*)
14862      VAR_OS=bsd
14863      VAR_OS_TYPE=unix
14864      ;;
14865    *cygwin*)
14866      VAR_OS=windows
14867      VAR_OS_ENV=windows.cygwin
14868      ;;
14869    *mingw*)
14870      VAR_OS=windows
14871      VAR_OS_ENV=windows.msys
14872      ;;
14873    *aix*)
14874      VAR_OS=aix
14875      VAR_OS_TYPE=unix
14876      ;;
14877    *)
14878      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14879      ;;
14880  esac
14881
14882
14883  # First argument is the cpu name from the trip/quad
14884  case "$host_cpu" in
14885    x86_64)
14886      VAR_CPU=x86_64
14887      VAR_CPU_ARCH=x86
14888      VAR_CPU_BITS=64
14889      VAR_CPU_ENDIAN=little
14890      ;;
14891    i?86)
14892      VAR_CPU=x86
14893      VAR_CPU_ARCH=x86
14894      VAR_CPU_BITS=32
14895      VAR_CPU_ENDIAN=little
14896      ;;
14897    arm*)
14898      VAR_CPU=arm
14899      VAR_CPU_ARCH=arm
14900      VAR_CPU_BITS=32
14901      VAR_CPU_ENDIAN=little
14902      ;;
14903    aarch64)
14904      VAR_CPU=aarch64
14905      VAR_CPU_ARCH=aarch64
14906      VAR_CPU_BITS=64
14907      VAR_CPU_ENDIAN=little
14908      ;;
14909    powerpc)
14910      VAR_CPU=ppc
14911      VAR_CPU_ARCH=ppc
14912      VAR_CPU_BITS=32
14913      VAR_CPU_ENDIAN=big
14914      ;;
14915    powerpc64)
14916      VAR_CPU=ppc64
14917      VAR_CPU_ARCH=ppc
14918      VAR_CPU_BITS=64
14919      VAR_CPU_ENDIAN=big
14920      ;;
14921    powerpc64le)
14922      VAR_CPU=ppc64
14923      VAR_CPU_ARCH=ppc
14924      VAR_CPU_BITS=64
14925      VAR_CPU_ENDIAN=little
14926      ;;
14927    s390)
14928      VAR_CPU=s390
14929      VAR_CPU_ARCH=s390
14930      VAR_CPU_BITS=32
14931      VAR_CPU_ENDIAN=big
14932      ;;
14933    s390x)
14934      VAR_CPU=s390x
14935      VAR_CPU_ARCH=s390
14936      VAR_CPU_BITS=64
14937      VAR_CPU_ENDIAN=big
14938      ;;
14939    sparc)
14940      VAR_CPU=sparc
14941      VAR_CPU_ARCH=sparc
14942      VAR_CPU_BITS=32
14943      VAR_CPU_ENDIAN=big
14944      ;;
14945    sparcv9|sparc64)
14946      VAR_CPU=sparcv9
14947      VAR_CPU_ARCH=sparc
14948      VAR_CPU_BITS=64
14949      VAR_CPU_ENDIAN=big
14950      ;;
14951    *)
14952      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14953      ;;
14954  esac
14955
14956  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14957  OPENJDK_TARGET_OS="$VAR_OS"
14958  if test "x$VAR_OS_TYPE" != x; then
14959    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14960  else
14961    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14962  fi
14963  if test "x$VAR_OS_ENV" != x; then
14964    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14965  else
14966    OPENJDK_TARGET_OS_ENV="$VAR_OS"
14967  fi
14968  OPENJDK_TARGET_CPU="$VAR_CPU"
14969  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14970  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14971  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14972
14973
14974
14975
14976
14977
14978
14979
14980  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14981$as_echo_n "checking openjdk-target os-cpu... " >&6; }
14982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14983$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14984
14985
14986
14987# Check whether --with-target-bits was given.
14988if test "${with_target_bits+set}" = set; then :
14989  withval=$with_target_bits;
14990fi
14991
14992
14993  # We have three types of compiles:
14994  # native  == normal compilation, target system == build system
14995  # cross   == traditional cross compilation, target system != build system; special toolchain needed
14996  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14997  #
14998  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14999    # We're doing a proper cross-compilation
15000    COMPILE_TYPE="cross"
15001  else
15002    COMPILE_TYPE="native"
15003  fi
15004
15005  if test "x$with_target_bits" != x; then
15006    if test "x$COMPILE_TYPE" = "xcross"; then
15007      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15008    fi
15009
15010    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15011      # A reduced build is requested
15012      COMPILE_TYPE="reduced"
15013      OPENJDK_TARGET_CPU_BITS=32
15014      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15015        OPENJDK_TARGET_CPU=x86
15016      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15017        OPENJDK_TARGET_CPU=sparc
15018      else
15019        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15020      fi
15021    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15022      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
15023    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15024      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15025$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15026    else
15027      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15028    fi
15029  fi
15030
15031
15032  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15033$as_echo_n "checking compilation type... " >&6; }
15034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15035$as_echo "$COMPILE_TYPE" >&6; }
15036
15037
15038  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15039    REQUIRED_OS_NAME=SunOS
15040    REQUIRED_OS_VERSION=5.10
15041  fi
15042  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15043    REQUIRED_OS_NAME=Linux
15044    REQUIRED_OS_VERSION=2.6
15045  fi
15046  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15047    REQUIRED_OS_NAME=Windows
15048    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15049      REQUIRED_OS_VERSION=5.2
15050    else
15051      REQUIRED_OS_VERSION=5.1
15052    fi
15053  fi
15054  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15055    REQUIRED_OS_NAME=Darwin
15056    REQUIRED_OS_VERSION=11.2
15057  fi
15058
15059
15060
15061
15062
15063  # Also store the legacy naming of the cpu.
15064  # Ie i586 and amd64 instead of x86 and x86_64
15065  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15066  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15067    OPENJDK_TARGET_CPU_LEGACY="i586"
15068  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15069    # On all platforms except MacOSX replace x86_64 with amd64.
15070    OPENJDK_TARGET_CPU_LEGACY="amd64"
15071  fi
15072
15073
15074  # And the second legacy naming of the cpu.
15075  # Ie i386 and amd64 instead of x86 and x86_64.
15076  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15077  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15078    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15079  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15080    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15081  fi
15082
15083
15084  # This is the name of the cpu (but using i386 and amd64 instead of
15085  # x86 and x86_64, respectively), preceeded by a /, to be used when
15086  # locating libraries. On macosx, it's empty, though.
15087  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15088  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15089    OPENJDK_TARGET_CPU_LIBDIR=""
15090  fi
15091
15092
15093  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15094  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15095  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15096  OPENJDK_TARGET_CPU_ISADIR=""
15097  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15098    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15099      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15100    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15101      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15102    fi
15103  fi
15104
15105
15106  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15107  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15108  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15109    # On linux only, we replace x86 with i386.
15110    OPENJDK_TARGET_CPU_OSARCH="i386"
15111  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15112    # On all platforms except macosx, we replace x86_64 with amd64.
15113    OPENJDK_TARGET_CPU_OSARCH="amd64"
15114  fi
15115
15116
15117  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15118  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15119    OPENJDK_TARGET_CPU_JLI="i386"
15120  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15121    # On all platforms except macosx, we replace x86_64 with amd64.
15122    OPENJDK_TARGET_CPU_JLI="amd64"
15123  fi
15124  # Now setup the -D flags for building libjli.
15125  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15126  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15127    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15128      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15129    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15130      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15131    fi
15132  fi
15133
15134
15135  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15136      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15137  else
15138      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15139  fi
15140
15141
15142  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15143    A_LP64="LP64:="
15144    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15145    # unpack200.exe
15146    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15147      ADD_LP64="-D_LP64=1"
15148    fi
15149  fi
15150  LP64=$A_LP64
15151
15152
15153  if test "x$COMPILE_TYPE" = "xcross"; then
15154    # FIXME: ... or should this include reduced builds..?
15155    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15156  else
15157    DEFINE_CROSS_COMPILE_ARCH=""
15158  fi
15159
15160
15161  # ZERO_ARCHDEF is used to enable architecture-specific code
15162  case "${OPENJDK_TARGET_CPU}" in
15163    ppc)     ZERO_ARCHDEF=PPC32 ;;
15164    ppc64)   ZERO_ARCHDEF=PPC64 ;;
15165    s390*)   ZERO_ARCHDEF=S390  ;;
15166    sparc*)  ZERO_ARCHDEF=SPARC ;;
15167    x86_64*) ZERO_ARCHDEF=AMD64 ;;
15168    x86)     ZERO_ARCHDEF=IA32  ;;
15169    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15170  esac
15171
15172
15173
15174
15175# Continue setting up basic stuff. Most remaining code require fundamental tools.
15176
15177  # Save the current directory this script was started from
15178  CURDIR="$PWD"
15179
15180  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15181  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15182  # was not available at that time.
15183  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15184  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15185    ORIGINAL_PATH="$REWRITTEN_PATH"
15186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15187$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15188  fi
15189
15190  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15191    PATH_SEP=";"
15192
15193  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15194  if test $SRC_ROOT_LENGTH -gt 100; then
15195    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15196  fi
15197
15198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15200$as_echo_n "checking cygwin release... " >&6; }
15201    CYGWIN_VERSION=`$UNAME -r`
15202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15203$as_echo "$CYGWIN_VERSION" >&6; }
15204    WINDOWS_ENV_VENDOR='cygwin'
15205    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15206
15207    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15208    if test "x$CYGWIN_VERSION_OLD" != x; then
15209      { $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
15210$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;}
15211      as_fn_error $? "Cannot continue" "$LINENO" 5
15212    fi
15213    if test "x$CYGPATH" = x; then
15214      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15215    fi
15216    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15217$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15218    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15219    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15220    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15221    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15223$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15224    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15225    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15226    if test "x$test_cygdrive_prefix" = x; then
15227      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15228    fi
15229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15231$as_echo_n "checking msys release... " >&6; }
15232    MSYS_VERSION=`$UNAME -r`
15233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15234$as_echo "$MSYS_VERSION" >&6; }
15235
15236    WINDOWS_ENV_VENDOR='msys'
15237    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15238
15239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15240$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15241    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15242    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15243
15244  windows_path="$MSYS_ROOT_PATH"
15245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15246    unix_path=`$CYGPATH -u "$windows_path"`
15247    MSYS_ROOT_PATH="$unix_path"
15248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15250    MSYS_ROOT_PATH="$unix_path"
15251  fi
15252
15253    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15254$as_echo "$MSYS_ROOT_PATH" >&6; }
15255    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15256  else
15257    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15258  fi
15259
15260  # Test if windows or unix (cygwin/msys) find is first in path.
15261  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15262$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15263  FIND_BINARY_OUTPUT=`find --version 2>&1`
15264  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15266$as_echo "unix style" >&6; }
15267  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15268    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15269$as_echo "Windows" >&6; }
15270    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15271$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15272    { $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
15273$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15274    as_fn_error $? "Cannot continue" "$LINENO" 5
15275  else
15276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15277$as_echo "unknown" >&6; }
15278    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15279$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15280  fi
15281
15282  else
15283    PATH_SEP=":"
15284  fi
15285
15286
15287  # We get the top-level directory from the supporting wrappers.
15288  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15289$as_echo_n "checking for top-level directory... " >&6; }
15290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15291$as_echo "$TOPDIR" >&6; }
15292
15293
15294  # Save the original version of TOPDIR for string comparisons
15295  ORIGINAL_TOPDIR="$TOPDIR"
15296
15297
15298  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15299
15300  # Only process if variable expands to non-empty
15301
15302  if test "x$CURDIR" != x; then
15303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15304
15305  # Input might be given as Windows format, start by converting to
15306  # unix format.
15307  path="$CURDIR"
15308  new_path=`$CYGPATH -u "$path"`
15309
15310  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15311  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15312  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15313  # "foo.exe" is OK but "foo" is an error.
15314  #
15315  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15316  # It is also a way to make sure we got the proper file name for the real test later on.
15317  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15318  if test "x$test_shortpath" = x; then
15319    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15320$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15321    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15322  fi
15323
15324  # Call helper function which possibly converts this using DOS-style short mode.
15325  # If so, the updated path is stored in $new_path.
15326
15327  input_path="$new_path"
15328  # Check if we need to convert this using DOS-style short mode. If the path
15329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15330  # take no chances and rewrite it.
15331  # Note: m4 eats our [], so we need to use [ and ] instead.
15332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15333  if test "x$has_forbidden_chars" != x; then
15334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15338      # Going to short mode and back again did indeed matter. Since short mode is
15339      # case insensitive, let's make it lowercase to improve readability.
15340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15341      # Now convert it back to Unix-style (cygpath)
15342      input_path=`$CYGPATH -u "$shortmode_path"`
15343      new_path="$input_path"
15344    fi
15345  fi
15346
15347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15348  if test "x$test_cygdrive_prefix" = x; then
15349    # As a simple fix, exclude /usr/bin since it's not a real path.
15350    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15352      # a path prefixed by /cygdrive for fixpath to work.
15353      new_path="$CYGWIN_ROOT_PATH$input_path"
15354    fi
15355  fi
15356
15357
15358  if test "x$path" != "x$new_path"; then
15359    CURDIR="$new_path"
15360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15361$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15362  fi
15363
15364    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15365
15366  path="$CURDIR"
15367  has_colon=`$ECHO $path | $GREP ^.:`
15368  new_path="$path"
15369  if test "x$has_colon" = x; then
15370    # Not in mixed or Windows style, start by that.
15371    new_path=`cmd //c echo $path`
15372  fi
15373
15374
15375  input_path="$new_path"
15376  # Check if we need to convert this using DOS-style short mode. If the path
15377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15378  # take no chances and rewrite it.
15379  # Note: m4 eats our [], so we need to use [ and ] instead.
15380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15381  if test "x$has_forbidden_chars" != x; then
15382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15384  fi
15385
15386
15387  windows_path="$new_path"
15388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15389    unix_path=`$CYGPATH -u "$windows_path"`
15390    new_path="$unix_path"
15391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15393    new_path="$unix_path"
15394  fi
15395
15396  if test "x$path" != "x$new_path"; then
15397    CURDIR="$new_path"
15398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15399$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15400  fi
15401
15402  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15403  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15404
15405    else
15406      # We're on a unix platform. Hooray! :)
15407      path="$CURDIR"
15408      has_space=`$ECHO "$path" | $GREP " "`
15409      if test "x$has_space" != x; then
15410        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15411$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15412        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15413      fi
15414
15415      # Use eval to expand a potential ~
15416      eval path="$path"
15417      if test ! -f "$path" && test ! -d "$path"; then
15418        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15419      fi
15420
15421      if test -d "$path"; then
15422        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15423      else
15424        dir="`$DIRNAME "$path"`"
15425        base="`$BASENAME "$path"`"
15426        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15427      fi
15428    fi
15429  fi
15430
15431
15432  # Only process if variable expands to non-empty
15433
15434  if test "x$TOPDIR" != x; then
15435    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15436
15437  # Input might be given as Windows format, start by converting to
15438  # unix format.
15439  path="$TOPDIR"
15440  new_path=`$CYGPATH -u "$path"`
15441
15442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15445  # "foo.exe" is OK but "foo" is an error.
15446  #
15447  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15448  # It is also a way to make sure we got the proper file name for the real test later on.
15449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15450  if test "x$test_shortpath" = x; then
15451    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15452$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15453    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15454  fi
15455
15456  # Call helper function which possibly converts this using DOS-style short mode.
15457  # If so, the updated path is stored in $new_path.
15458
15459  input_path="$new_path"
15460  # Check if we need to convert this using DOS-style short mode. If the path
15461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15462  # take no chances and rewrite it.
15463  # Note: m4 eats our [], so we need to use [ and ] instead.
15464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15465  if test "x$has_forbidden_chars" != x; then
15466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15470      # Going to short mode and back again did indeed matter. Since short mode is
15471      # case insensitive, let's make it lowercase to improve readability.
15472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15473      # Now convert it back to Unix-style (cygpath)
15474      input_path=`$CYGPATH -u "$shortmode_path"`
15475      new_path="$input_path"
15476    fi
15477  fi
15478
15479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15480  if test "x$test_cygdrive_prefix" = x; then
15481    # As a simple fix, exclude /usr/bin since it's not a real path.
15482    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15484      # a path prefixed by /cygdrive for fixpath to work.
15485      new_path="$CYGWIN_ROOT_PATH$input_path"
15486    fi
15487  fi
15488
15489
15490  if test "x$path" != "x$new_path"; then
15491    TOPDIR="$new_path"
15492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15493$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15494  fi
15495
15496    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15497
15498  path="$TOPDIR"
15499  has_colon=`$ECHO $path | $GREP ^.:`
15500  new_path="$path"
15501  if test "x$has_colon" = x; then
15502    # Not in mixed or Windows style, start by that.
15503    new_path=`cmd //c echo $path`
15504  fi
15505
15506
15507  input_path="$new_path"
15508  # Check if we need to convert this using DOS-style short mode. If the path
15509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15510  # take no chances and rewrite it.
15511  # Note: m4 eats our [], so we need to use [ and ] instead.
15512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15513  if test "x$has_forbidden_chars" != x; then
15514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15516  fi
15517
15518
15519  windows_path="$new_path"
15520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15521    unix_path=`$CYGPATH -u "$windows_path"`
15522    new_path="$unix_path"
15523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15525    new_path="$unix_path"
15526  fi
15527
15528  if test "x$path" != "x$new_path"; then
15529    TOPDIR="$new_path"
15530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15531$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15532  fi
15533
15534  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15535  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15536
15537    else
15538      # We're on a unix platform. Hooray! :)
15539      path="$TOPDIR"
15540      has_space=`$ECHO "$path" | $GREP " "`
15541      if test "x$has_space" != x; then
15542        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15543$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15544        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15545      fi
15546
15547      # Use eval to expand a potential ~
15548      eval path="$path"
15549      if test ! -f "$path" && test ! -d "$path"; then
15550        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15551      fi
15552
15553      if test -d "$path"; then
15554        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15555      else
15556        dir="`$DIRNAME "$path"`"
15557        base="`$BASENAME "$path"`"
15558        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15559      fi
15560    fi
15561  fi
15562
15563  # SRC_ROOT is a traditional alias for TOPDIR.
15564  SRC_ROOT=$TOPDIR
15565
15566  # Calculate a canonical version of TOPDIR for string comparisons
15567  CANONICAL_TOPDIR=$TOPDIR
15568
15569  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15570    # Follow a chain of symbolic links. Use readlink
15571    # where it exists, else fall back to horribly
15572    # complicated shell code.
15573    if test "x$READLINK_TESTED" != yes; then
15574      # On MacOSX there is a readlink tool with a different
15575      # purpose than the GNU readlink tool. Check the found readlink.
15576      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15577      if test "x$ISGNU" = x; then
15578        # A readlink that we do not know how to use.
15579        # Are there other non-GNU readlinks out there?
15580        READLINK_TESTED=yes
15581        READLINK=
15582      fi
15583    fi
15584
15585    if test "x$READLINK" != x; then
15586      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15587    else
15588      # Save the current directory for restoring afterwards
15589      STARTDIR=$PWD
15590      COUNTER=0
15591      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15592      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15593      cd $sym_link_dir
15594      # Use -P flag to resolve symlinks in directories.
15595      cd `$THEPWDCMD -P`
15596      sym_link_dir=`$THEPWDCMD -P`
15597      # Resolve file symlinks
15598      while test $COUNTER -lt 20; do
15599        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15600        if test "x$ISLINK" == x; then
15601          # This is not a symbolic link! We are done!
15602          break
15603        fi
15604        # Again resolve directory symlinks since the target of the just found
15605        # link could be in a different directory
15606        cd `$DIRNAME $ISLINK`
15607        sym_link_dir=`$THEPWDCMD -P`
15608        sym_link_file=`$BASENAME $ISLINK`
15609        let COUNTER=COUNTER+1
15610      done
15611      cd $STARTDIR
15612      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15613    fi
15614  fi
15615
15616
15617
15618  # Locate the directory of this script.
15619  AUTOCONF_DIR=$TOPDIR/common/autoconf
15620
15621
15622# Check if it's a pure open build or if custom sources are to be used.
15623
15624  # Check whether --enable-openjdk-only was given.
15625if test "${enable_openjdk_only+set}" = set; then :
15626  enableval=$enable_openjdk_only;
15627else
15628  enable_openjdk_only="no"
15629fi
15630
15631
15632  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15633$as_echo_n "checking for presence of closed sources... " >&6; }
15634  if test -d "$SRC_ROOT/jdk/src/closed"; then
15635    CLOSED_SOURCE_PRESENT=yes
15636  else
15637    CLOSED_SOURCE_PRESENT=no
15638  fi
15639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15640$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15641
15642  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15643$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15644  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15646$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15647
15648  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15649    OPENJDK=true
15650    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15651      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15652$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15653    fi
15654  else
15655    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15656      OPENJDK=true
15657    else
15658      OPENJDK=false
15659    fi
15660  fi
15661
15662  if test "x$OPENJDK" = "xtrue"; then
15663    SET_OPENJDK="OPENJDK=true"
15664  fi
15665
15666
15667
15668  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15669  # the IncludeCustomExtension macro.
15670
15671
15672# Check whether --with-custom-make-dir was given.
15673if test "${with_custom_make_dir+set}" = set; then :
15674  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
15675$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15676fi
15677
15678
15679
15680
15681# These are needed to be able to create a configuration name (and thus the output directory)
15682
15683  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15684$as_echo_n "checking which variant of the JDK to build... " >&6; }
15685
15686# Check whether --with-jdk-variant was given.
15687if test "${with_jdk_variant+set}" = set; then :
15688  withval=$with_jdk_variant;
15689fi
15690
15691
15692  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15693    JDK_VARIANT="normal"
15694  else
15695    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15696  fi
15697
15698
15699
15700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15701$as_echo "$JDK_VARIANT" >&6; }
15702
15703
15704
15705# Check whether --with-jvm-interpreter was given.
15706if test "${with_jvm_interpreter+set}" = set; then :
15707  withval=$with_jvm_interpreter;
15708fi
15709
15710
15711  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15712$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15713  if test "x$with_jvm_interpreter" = x; then
15714    JVM_INTERPRETER="template"
15715  else
15716    JVM_INTERPRETER="$with_jvm_interpreter"
15717  fi
15718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_INTERPRETER" >&5
15719$as_echo "$JVM_INTERPRETER" >&6; }
15720
15721  if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15722    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15723  fi
15724
15725
15726
15727
15728  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15729$as_echo_n "checking which variants of the JVM to build... " >&6; }
15730
15731# Check whether --with-jvm-variants was given.
15732if test "${with_jvm_variants+set}" = set; then :
15733  withval=$with_jvm_variants;
15734fi
15735
15736
15737  if test "x$with_jvm_variants" = x; then
15738    with_jvm_variants="server"
15739  fi
15740
15741  JVM_VARIANTS=",$with_jvm_variants,"
15742  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
15743
15744  if test "x$TEST_VARIANTS" != "x,"; then
15745    as_fn_error $? "The available JVM variants are: server, client, minimal1, zero, zeroshark, core" "$LINENO" 5
15746  fi
15747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15748$as_echo "$with_jvm_variants" >&6; }
15749
15750  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15751  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15752  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15753  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15754  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15755  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15756
15757  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15758    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15759      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15760    fi
15761  fi
15762  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15763    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15764      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15765    fi
15766  fi
15767
15768  # Replace the commas with AND for use in the build directory name.
15769  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15770  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/'`
15771  if test "x$COUNT_VARIANTS" != "x,1"; then
15772    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15773  else
15774    BUILDING_MULTIPLE_JVM_VARIANTS=no
15775  fi
15776
15777  if test "x$JVM_VARIANT_ZERO" = xtrue && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xyes; then
15778    as_fn_error $? "You cannot build multiple variants with zero." "$LINENO" 5
15779  fi
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789  INCLUDE_SA=true
15790  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15791    INCLUDE_SA=false
15792  fi
15793  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15794    INCLUDE_SA=false
15795  fi
15796  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15797    INCLUDE_SA=false
15798  fi
15799  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15800    INCLUDE_SA=false
15801  fi
15802
15803
15804  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15805    MACOSX_UNIVERSAL="true"
15806  fi
15807
15808
15809
15810
15811  DEBUG_LEVEL="release"
15812  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15813$as_echo_n "checking which debug level to use... " >&6; }
15814  # Check whether --enable-debug was given.
15815if test "${enable_debug+set}" = set; then :
15816  enableval=$enable_debug;
15817        ENABLE_DEBUG="${enableval}"
15818        DEBUG_LEVEL="fastdebug"
15819
15820else
15821  ENABLE_DEBUG="no"
15822fi
15823
15824
15825
15826# Check whether --with-debug-level was given.
15827if test "${with_debug_level+set}" = set; then :
15828  withval=$with_debug_level;
15829        DEBUG_LEVEL="${withval}"
15830        if test "x$ENABLE_DEBUG" = xyes; then
15831          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15832        fi
15833
15834fi
15835
15836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15837$as_echo "$DEBUG_LEVEL" >&6; }
15838
15839  if test "x$DEBUG_LEVEL" != xrelease && \
15840      test "x$DEBUG_LEVEL" != xoptimized && \
15841      test "x$DEBUG_LEVEL" != xfastdebug && \
15842      test "x$DEBUG_LEVEL" != xslowdebug; then
15843    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15844  fi
15845
15846
15847  case $DEBUG_LEVEL in
15848    release )
15849      VARIANT="OPT"
15850      FASTDEBUG="false"
15851      DEBUG_CLASSFILES="false"
15852      BUILD_VARIANT_RELEASE=""
15853      HOTSPOT_DEBUG_LEVEL="product"
15854      HOTSPOT_EXPORT="product"
15855      ;;
15856    fastdebug )
15857      VARIANT="DBG"
15858      FASTDEBUG="true"
15859      DEBUG_CLASSFILES="true"
15860      BUILD_VARIANT_RELEASE="-fastdebug"
15861      HOTSPOT_DEBUG_LEVEL="fastdebug"
15862      HOTSPOT_EXPORT="fastdebug"
15863      ;;
15864    slowdebug )
15865      VARIANT="DBG"
15866      FASTDEBUG="false"
15867      DEBUG_CLASSFILES="true"
15868      BUILD_VARIANT_RELEASE="-debug"
15869      HOTSPOT_DEBUG_LEVEL="debug"
15870      HOTSPOT_EXPORT="debug"
15871      ;;
15872    optimized )
15873      VARIANT="OPT"
15874      FASTDEBUG="false"
15875      DEBUG_CLASSFILES="false"
15876      BUILD_VARIANT_RELEASE="-optimized"
15877      HOTSPOT_DEBUG_LEVEL="optimized"
15878      HOTSPOT_EXPORT="optimized"
15879      ;;
15880  esac
15881
15882  # The debug level 'optimized' is a little special because it is currently only
15883  # applicable to the HotSpot build where it means to build a completely
15884  # optimized version of the VM without any debugging code (like for the
15885  # 'release' debug level which is called 'product' in the HotSpot build) but
15886  # with the exception that it can contain additional code which is otherwise
15887  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15888  # test new and/or experimental features which are not intended for customer
15889  # shipment. Because these new features need to be tested and benchmarked in
15890  # real world scenarios, we want to build the containing JDK at the 'release'
15891  # debug level.
15892  if test "x$DEBUG_LEVEL" = xoptimized; then
15893    DEBUG_LEVEL="release"
15894  fi
15895
15896  #####
15897  # Generate the legacy makefile targets for hotspot.
15898  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15899  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15900  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15901  # But until then ...
15902  HOTSPOT_TARGET=""
15903
15904  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15905    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15906  fi
15907
15908  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15909    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15910  fi
15911
15912  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15913    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15914  fi
15915
15916  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15917    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15918  fi
15919
15920  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15921    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15922  fi
15923
15924  if test "x$JVM_VARIANT_CORE" = xtrue; then
15925    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15926  fi
15927
15928  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15929
15930  # On Macosx universal binaries are produced, but they only contain
15931  # 64 bit intel. This invalidates control of which jvms are built
15932  # from configure, but only server is valid anyway. Fix this
15933  # when hotspot makefiles are rewritten.
15934  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15935    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15936  fi
15937
15938  #####
15939
15940
15941
15942
15943
15944
15945
15946
15947# With basic setup done, call the custom early hook.
15948
15949
15950# Check if we have devkits, extra paths or sysroot set.
15951
15952
15953# Check whether --with-devkit was given.
15954if test "${with_devkit+set}" = set; then :
15955  withval=$with_devkit;
15956
15957  # Only process if variable expands to non-empty
15958
15959  if test "x$with_devkit" != x; then
15960    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15961
15962  # Input might be given as Windows format, start by converting to
15963  # unix format.
15964  path="$with_devkit"
15965  new_path=`$CYGPATH -u "$path"`
15966
15967  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15968  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15969  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15970  # "foo.exe" is OK but "foo" is an error.
15971  #
15972  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15973  # It is also a way to make sure we got the proper file name for the real test later on.
15974  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15975  if test "x$test_shortpath" = x; then
15976    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15977$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15978    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15979  fi
15980
15981  # Call helper function which possibly converts this using DOS-style short mode.
15982  # If so, the updated path is stored in $new_path.
15983
15984  input_path="$new_path"
15985  # Check if we need to convert this using DOS-style short mode. If the path
15986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15987  # take no chances and rewrite it.
15988  # Note: m4 eats our [], so we need to use [ and ] instead.
15989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15990  if test "x$has_forbidden_chars" != x; then
15991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15992    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15993    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15994    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15995      # Going to short mode and back again did indeed matter. Since short mode is
15996      # case insensitive, let's make it lowercase to improve readability.
15997      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15998      # Now convert it back to Unix-style (cygpath)
15999      input_path=`$CYGPATH -u "$shortmode_path"`
16000      new_path="$input_path"
16001    fi
16002  fi
16003
16004  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16005  if test "x$test_cygdrive_prefix" = x; then
16006    # As a simple fix, exclude /usr/bin since it's not a real path.
16007    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16008      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16009      # a path prefixed by /cygdrive for fixpath to work.
16010      new_path="$CYGWIN_ROOT_PATH$input_path"
16011    fi
16012  fi
16013
16014
16015  if test "x$path" != "x$new_path"; then
16016    with_devkit="$new_path"
16017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16018$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16019  fi
16020
16021    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16022
16023  path="$with_devkit"
16024  has_colon=`$ECHO $path | $GREP ^.:`
16025  new_path="$path"
16026  if test "x$has_colon" = x; then
16027    # Not in mixed or Windows style, start by that.
16028    new_path=`cmd //c echo $path`
16029  fi
16030
16031
16032  input_path="$new_path"
16033  # Check if we need to convert this using DOS-style short mode. If the path
16034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16035  # take no chances and rewrite it.
16036  # Note: m4 eats our [], so we need to use [ and ] instead.
16037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16038  if test "x$has_forbidden_chars" != x; then
16039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16040    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16041  fi
16042
16043
16044  windows_path="$new_path"
16045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16046    unix_path=`$CYGPATH -u "$windows_path"`
16047    new_path="$unix_path"
16048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16050    new_path="$unix_path"
16051  fi
16052
16053  if test "x$path" != "x$new_path"; then
16054    with_devkit="$new_path"
16055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16056$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16057  fi
16058
16059  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16060  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16061
16062    else
16063      # We're on a unix platform. Hooray! :)
16064      path="$with_devkit"
16065      has_space=`$ECHO "$path" | $GREP " "`
16066      if test "x$has_space" != x; then
16067        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16068$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16069        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16070      fi
16071
16072      # Use eval to expand a potential ~
16073      eval path="$path"
16074      if test ! -f "$path" && test ! -d "$path"; then
16075        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16076      fi
16077
16078      if test -d "$path"; then
16079        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16080      else
16081        dir="`$DIRNAME "$path"`"
16082        base="`$BASENAME "$path"`"
16083        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16084      fi
16085    fi
16086  fi
16087
16088        DEVKIT_ROOT="$with_devkit"
16089        # Check for a meta data info file in the root of the devkit
16090        if test -f "$DEVKIT_ROOT/devkit.info"; then
16091          . $DEVKIT_ROOT/devkit.info
16092          # This potentially sets the following:
16093          # A descriptive name of the devkit
16094
16095  if test "x$DEVKIT_NAME" = x; then
16096    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16097  fi
16098
16099          # Corresponds to --with-extra-path
16100
16101  if test "x$DEVKIT_EXTRA_PATH" = x; then
16102    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16103  fi
16104
16105          # Corresponds to --with-toolchain-path
16106
16107  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16108    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16109  fi
16110
16111          # Corresponds to --with-sysroot
16112
16113  if test "x$DEVKIT_SYSROOT" = x; then
16114    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16115  fi
16116
16117
16118          # Identifies the Visual Studio version in the devkit
16119
16120  if test "x$DEVKIT_VS_VERSION" = x; then
16121    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16122  fi
16123
16124          # The Visual Studio include environment variable
16125
16126  if test "x$DEVKIT_VS_INCLUDE" = x; then
16127    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16128  fi
16129
16130          # The Visual Studio lib environment variable
16131
16132  if test "x$DEVKIT_VS_LIB" = x; then
16133    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16134  fi
16135
16136          # Corresponds to --with-msvcr-dll
16137
16138  if test "x$DEVKIT_MSVCR_DLL" = x; then
16139    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16140  fi
16141
16142          # Corresponds to --with-msvcp-dll
16143
16144  if test "x$DEVKIT_MSVCP_DLL" = x; then
16145    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16146  fi
16147
16148        fi
16149
16150        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16151$as_echo_n "checking for devkit... " >&6; }
16152        if test "x$DEVKIT_NAME" != x; then
16153          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16154$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16155        else
16156          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16157$as_echo "$DEVKIT_ROOT" >&6; }
16158        fi
16159
16160
16161  if test "x$DEVKIT_EXTRA_PATH" != x; then
16162    if test "x$EXTRA_PATH" = x; then
16163      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16164    else
16165      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16166    fi
16167  fi
16168
16169
16170        # Fallback default of just /bin if DEVKIT_PATH is not defined
16171        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16172          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16173        fi
16174
16175  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16176    if test "x$TOOLCHAIN_PATH" = x; then
16177      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16178    else
16179      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16180    fi
16181  fi
16182
16183
16184        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16185        # places for backwards compatiblity.
16186        if test "x$DEVKIT_SYSROOT" != x; then
16187          SYSROOT="$DEVKIT_SYSROOT"
16188        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16189          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16190        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16191          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16192        fi
16193
16194
16195fi
16196
16197
16198  # You can force the sysroot if the sysroot encoded into the compiler tools
16199  # is not correct.
16200
16201# Check whether --with-sys-root was given.
16202if test "${with_sys_root+set}" = set; then :
16203  withval=$with_sys_root; SYSROOT=$with_sys_root
16204
16205fi
16206
16207
16208
16209# Check whether --with-sysroot was given.
16210if test "${with_sysroot+set}" = set; then :
16211  withval=$with_sysroot; SYSROOT=$with_sysroot
16212
16213fi
16214
16215
16216
16217# Check whether --with-tools-dir was given.
16218if test "${with_tools_dir+set}" = set; then :
16219  withval=$with_tools_dir;
16220  if test "x$with_tools_dir" != x; then
16221    if test "x$TOOLCHAIN_PATH" = x; then
16222      TOOLCHAIN_PATH="$with_tools_dir"
16223    else
16224      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16225    fi
16226  fi
16227
16228
16229fi
16230
16231
16232
16233# Check whether --with-toolchain-path was given.
16234if test "${with_toolchain_path+set}" = set; then :
16235  withval=$with_toolchain_path;
16236  if test "x$with_toolchain_path" != x; then
16237    if test "x$TOOLCHAIN_PATH" = x; then
16238      TOOLCHAIN_PATH="$with_toolchain_path"
16239    else
16240      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16241    fi
16242  fi
16243
16244
16245fi
16246
16247
16248
16249# Check whether --with-extra-path was given.
16250if test "${with_extra_path+set}" = set; then :
16251  withval=$with_extra_path;
16252  if test "x$with_extra_path" != x; then
16253    if test "x$EXTRA_PATH" = x; then
16254      EXTRA_PATH="$with_extra_path"
16255    else
16256      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16257    fi
16258  fi
16259
16260
16261fi
16262
16263
16264  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16265    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16266    # If not, detect if Xcode is installed by running xcodebuild -version
16267    # if no Xcode installed, xcodebuild exits with 1
16268    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16269    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16270      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16271      # fall back on the stub binary in /usr/bin/xcodebuild
16272      # Extract the first word of "xcodebuild", so it can be a program name with args.
16273set dummy xcodebuild; ac_word=$2
16274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16275$as_echo_n "checking for $ac_word... " >&6; }
16276if ${ac_cv_path_XCODEBUILD+:} false; then :
16277  $as_echo_n "(cached) " >&6
16278else
16279  case $XCODEBUILD in
16280  [\\/]* | ?:[\\/]*)
16281  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16282  ;;
16283  *)
16284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16285for as_dir in $TOOLCHAIN_PATH
16286do
16287  IFS=$as_save_IFS
16288  test -z "$as_dir" && as_dir=.
16289    for ac_exec_ext in '' $ac_executable_extensions; do
16290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16291    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16293    break 2
16294  fi
16295done
16296  done
16297IFS=$as_save_IFS
16298
16299  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16300  ;;
16301esac
16302fi
16303XCODEBUILD=$ac_cv_path_XCODEBUILD
16304if test -n "$XCODEBUILD"; then
16305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16306$as_echo "$XCODEBUILD" >&6; }
16307else
16308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16309$as_echo "no" >&6; }
16310fi
16311
16312
16313    else
16314      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16315      # when only the command line tools are installed there are no SDKs, so headers
16316      # are copied into the system frameworks
16317      XCODEBUILD=
16318
16319    fi
16320
16321    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16322$as_echo_n "checking for sdk name... " >&6; }
16323
16324# Check whether --with-sdk-name was given.
16325if test "${with_sdk_name+set}" = set; then :
16326  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16327
16328fi
16329
16330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16331$as_echo "$SDKNAME" >&6; }
16332
16333    # if toolchain path is specified then don't rely on system headers, they may not compile
16334    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16335    test -z "$TOOLCHAIN_PATH" && \
16336      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16337
16338    if test -z "$SYSROOT"; then
16339      if test -n "$XCODEBUILD"; then
16340        # if we don't have system headers, use default SDK name (last resort)
16341        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16342          SDKNAME=${SDKNAME:-macosx}
16343        fi
16344
16345        if test -n "$SDKNAME"; then
16346          # Call xcodebuild to determine SYSROOT
16347          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16348        fi
16349      else
16350        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16351          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
16352        fi
16353      fi
16354    else
16355      # warn user if --with-sdk-name was also set
16356      if test -n "$with_sdk_name"; then
16357        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16358$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16359      fi
16360    fi
16361
16362    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16363      # If no system framework headers, then SYSROOT must be set, or we won't build
16364      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
16365    fi
16366
16367    # Perform a basic sanity test
16368    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16369      if test -z "$SYSROOT"; then
16370        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
16371      else
16372        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16373      fi
16374    fi
16375
16376    # set SDKROOT too, Xcode tools will pick it up
16377    SDKROOT=$SYSROOT
16378
16379  fi
16380
16381  # Prepend the extra path to the global path
16382
16383  if test "x$EXTRA_PATH" != x; then
16384    if test "x$PATH" = x; then
16385      PATH="$EXTRA_PATH"
16386    else
16387      PATH="$EXTRA_PATH:$PATH"
16388    fi
16389  fi
16390
16391
16392  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16393    # Add extra search paths on solaris for utilities like ar and as etc...
16394    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16395  fi
16396
16397  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16398$as_echo_n "checking for sysroot... " >&6; }
16399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16400$as_echo "$SYSROOT" >&6; }
16401  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16402$as_echo_n "checking for toolchain path... " >&6; }
16403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16404$as_echo "$TOOLCHAIN_PATH" >&6; }
16405  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16406$as_echo_n "checking for extra path... " >&6; }
16407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16408$as_echo "$EXTRA_PATH" >&6; }
16409
16410
16411# To properly create a configuration name, we need to have the OpenJDK target
16412# and options (variants and debug level) parsed.
16413
16414
16415
16416# Check whether --with-conf-name was given.
16417if test "${with_conf_name+set}" = set; then :
16418  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16419fi
16420
16421
16422  # Test from where we are running configure, in or outside of src root.
16423  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16424$as_echo_n "checking where to store configuration... " >&6; }
16425  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16426      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16427      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16428    # We are running configure from the src root.
16429    # Create a default ./build/target-variant-debuglevel output root.
16430    if test "x${CONF_NAME}" = x; then
16431      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16432$as_echo "in default location" >&6; }
16433      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16434    else
16435      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16436$as_echo "in build directory with custom name" >&6; }
16437    fi
16438    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16439    $MKDIR -p "$OUTPUT_ROOT"
16440    if test ! -d "$OUTPUT_ROOT"; then
16441      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16442    fi
16443  else
16444    # We are running configure from outside of the src dir.
16445    # Then use the current directory as output dir!
16446    # If configuration is situated in normal build directory, just use the build
16447    # directory name as configuration name, otherwise use the complete path.
16448    if test "x${CONF_NAME}" = x; then
16449      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16450    fi
16451    OUTPUT_ROOT="$CURDIR"
16452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16453$as_echo "in current directory" >&6; }
16454
16455    # WARNING: This might be a bad thing to do. You need to be sure you want to
16456    # have a configuration in this directory. Do some sanity checks!
16457
16458    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16459      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16460      # other files
16461      files_present=`$LS $OUTPUT_ROOT`
16462      # Configure has already touched config.log and confdefs.h in the current dir when this check
16463      # is performed.
16464      filtered_files=`$ECHO "$files_present" \
16465          | $SED -e 's/config.log//g' \
16466              -e 's/configure.log//g' \
16467              -e 's/confdefs.h//g' \
16468              -e 's/ //g' \
16469          | $TR -d '\n'`
16470      if test "x$filtered_files" != x; then
16471        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16472$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16473        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16474$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16475        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16476$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16477        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16478$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16479        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16480$as_echo "$as_me: seriously mess up just about everything." >&6;}
16481        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16482$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16483        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16484$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16485        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16486      fi
16487    fi
16488  fi
16489  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16490$as_echo_n "checking what configuration name to use... " >&6; }
16491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16492$as_echo "$CONF_NAME" >&6; }
16493
16494
16495  # Only process if variable expands to non-empty
16496
16497  if test "x$OUTPUT_ROOT" != x; then
16498    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16499
16500  # Input might be given as Windows format, start by converting to
16501  # unix format.
16502  path="$OUTPUT_ROOT"
16503  new_path=`$CYGPATH -u "$path"`
16504
16505  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16506  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16507  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16508  # "foo.exe" is OK but "foo" is an error.
16509  #
16510  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16511  # It is also a way to make sure we got the proper file name for the real test later on.
16512  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16513  if test "x$test_shortpath" = x; then
16514    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16515$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16516    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16517  fi
16518
16519  # Call helper function which possibly converts this using DOS-style short mode.
16520  # If so, the updated path is stored in $new_path.
16521
16522  input_path="$new_path"
16523  # Check if we need to convert this using DOS-style short mode. If the path
16524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16525  # take no chances and rewrite it.
16526  # Note: m4 eats our [], so we need to use [ and ] instead.
16527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16528  if test "x$has_forbidden_chars" != x; then
16529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16530    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16531    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16532    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16533      # Going to short mode and back again did indeed matter. Since short mode is
16534      # case insensitive, let's make it lowercase to improve readability.
16535      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16536      # Now convert it back to Unix-style (cygpath)
16537      input_path=`$CYGPATH -u "$shortmode_path"`
16538      new_path="$input_path"
16539    fi
16540  fi
16541
16542  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16543  if test "x$test_cygdrive_prefix" = x; then
16544    # As a simple fix, exclude /usr/bin since it's not a real path.
16545    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16546      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16547      # a path prefixed by /cygdrive for fixpath to work.
16548      new_path="$CYGWIN_ROOT_PATH$input_path"
16549    fi
16550  fi
16551
16552
16553  if test "x$path" != "x$new_path"; then
16554    OUTPUT_ROOT="$new_path"
16555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16556$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16557  fi
16558
16559    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16560
16561  path="$OUTPUT_ROOT"
16562  has_colon=`$ECHO $path | $GREP ^.:`
16563  new_path="$path"
16564  if test "x$has_colon" = x; then
16565    # Not in mixed or Windows style, start by that.
16566    new_path=`cmd //c echo $path`
16567  fi
16568
16569
16570  input_path="$new_path"
16571  # Check if we need to convert this using DOS-style short mode. If the path
16572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16573  # take no chances and rewrite it.
16574  # Note: m4 eats our [], so we need to use [ and ] instead.
16575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16576  if test "x$has_forbidden_chars" != x; then
16577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16578    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16579  fi
16580
16581
16582  windows_path="$new_path"
16583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16584    unix_path=`$CYGPATH -u "$windows_path"`
16585    new_path="$unix_path"
16586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16588    new_path="$unix_path"
16589  fi
16590
16591  if test "x$path" != "x$new_path"; then
16592    OUTPUT_ROOT="$new_path"
16593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16594$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16595  fi
16596
16597  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16598  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16599
16600    else
16601      # We're on a unix platform. Hooray! :)
16602      path="$OUTPUT_ROOT"
16603      has_space=`$ECHO "$path" | $GREP " "`
16604      if test "x$has_space" != x; then
16605        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16606$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16607        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16608      fi
16609
16610      # Use eval to expand a potential ~
16611      eval path="$path"
16612      if test ! -f "$path" && test ! -d "$path"; then
16613        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16614      fi
16615
16616      if test -d "$path"; then
16617        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16618      else
16619        dir="`$DIRNAME "$path"`"
16620        base="`$BASENAME "$path"`"
16621        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16622      fi
16623    fi
16624  fi
16625
16626
16627  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16628  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16629
16630  SPEC=$OUTPUT_ROOT/spec.gmk
16631
16632  CONF_NAME=$CONF_NAME
16633
16634  OUTPUT_ROOT=$OUTPUT_ROOT
16635
16636
16637
16638  # The spec.gmk file contains all variables for the make system.
16639  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16640
16641  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16642  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16643
16644  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16645  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16646
16647  # The compare.sh is used to compare the build output to other builds.
16648  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16649
16650  # The generated Makefile knows where the spec.gmk is and where the source is.
16651  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16652  # which will look for generated configurations
16653  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16654
16655
16656
16657# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16658
16659  for ac_prog in apt-get yum port pkgutil pkgadd
16660do
16661  # Extract the first word of "$ac_prog", so it can be a program name with args.
16662set dummy $ac_prog; ac_word=$2
16663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16664$as_echo_n "checking for $ac_word... " >&6; }
16665if ${ac_cv_prog_PKGHANDLER+:} false; then :
16666  $as_echo_n "(cached) " >&6
16667else
16668  if test -n "$PKGHANDLER"; then
16669  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16670else
16671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16672for as_dir in $PATH
16673do
16674  IFS=$as_save_IFS
16675  test -z "$as_dir" && as_dir=.
16676    for ac_exec_ext in '' $ac_executable_extensions; do
16677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16678    ac_cv_prog_PKGHANDLER="$ac_prog"
16679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16680    break 2
16681  fi
16682done
16683  done
16684IFS=$as_save_IFS
16685
16686fi
16687fi
16688PKGHANDLER=$ac_cv_prog_PKGHANDLER
16689if test -n "$PKGHANDLER"; then
16690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16691$as_echo "$PKGHANDLER" >&6; }
16692else
16693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16694$as_echo "no" >&6; }
16695fi
16696
16697
16698  test -n "$PKGHANDLER" && break
16699done
16700
16701
16702
16703# Setup tools that requires more complex handling, or that is not needed by the configure script.
16704
16705
16706
16707  # Publish this variable in the help.
16708
16709
16710  if [ -z "${MAKE+x}" ]; then
16711    # The variable is not set by user, try to locate tool using the code snippet
16712
16713    # Try our hardest to locate a correct version of GNU make
16714    for ac_prog in gmake
16715do
16716  # Extract the first word of "$ac_prog", so it can be a program name with args.
16717set dummy $ac_prog; ac_word=$2
16718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16719$as_echo_n "checking for $ac_word... " >&6; }
16720if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16721  $as_echo_n "(cached) " >&6
16722else
16723  case $CHECK_GMAKE in
16724  [\\/]* | ?:[\\/]*)
16725  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16726  ;;
16727  *)
16728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16729for as_dir in $PATH
16730do
16731  IFS=$as_save_IFS
16732  test -z "$as_dir" && as_dir=.
16733    for ac_exec_ext in '' $ac_executable_extensions; do
16734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16735    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16737    break 2
16738  fi
16739done
16740  done
16741IFS=$as_save_IFS
16742
16743  ;;
16744esac
16745fi
16746CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16747if test -n "$CHECK_GMAKE"; then
16748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16749$as_echo "$CHECK_GMAKE" >&6; }
16750else
16751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16752$as_echo "no" >&6; }
16753fi
16754
16755
16756  test -n "$CHECK_GMAKE" && break
16757done
16758
16759
16760  MAKE_CANDIDATE=""$CHECK_GMAKE""
16761  DESCRIPTION="gmake in PATH"
16762
16763  # On Cygwin, we require a newer version of make than on other platforms
16764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16765    MAKE_VERSION_EXPR="-e 4\."
16766    MAKE_REQUIRED_VERSION="4.0"
16767   else
16768    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16769    MAKE_REQUIRED_VERSION="3.81"
16770  fi
16771
16772  if test "x$MAKE_CANDIDATE" != x; then
16773    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16774$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16775    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16776    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16777    if test "x$IS_GNU_MAKE" = x; then
16778      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16779$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16780    else
16781      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16782      if test "x$IS_MODERN_MAKE" = x; then
16783        { $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
16784$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;}
16785      else
16786        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16787          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16788            MAKE_EXPECTED_ENV='cygwin'
16789          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16790            MAKE_EXPECTED_ENV='msys'
16791          else
16792            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16793          fi
16794          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16795          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16796        else
16797          # Not relevant for non-Windows
16798          IS_MAKE_CORRECT_ENV=true
16799        fi
16800        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16801          { $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
16802$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;}
16803        else
16804          FOUND_MAKE=$MAKE_CANDIDATE
16805
16806  # Only process if variable expands to non-empty
16807
16808  if test "x$FOUND_MAKE" != x; then
16809    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16810
16811  # First separate the path from the arguments. This will split at the first
16812  # space.
16813  complete="$FOUND_MAKE"
16814  path="${complete%% *}"
16815  tmp="$complete EOL"
16816  arguments="${tmp#* }"
16817
16818  # Input might be given as Windows format, start by converting to
16819  # unix format.
16820  new_path=`$CYGPATH -u "$path"`
16821
16822  # Now try to locate executable using which
16823  new_path=`$WHICH "$new_path" 2> /dev/null`
16824  # bat and cmd files are not always considered executable in cygwin causing which
16825  # to not find them
16826  if test "x$new_path" = x \
16827      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16828      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16829    new_path=`$CYGPATH -u "$path"`
16830  fi
16831  if test "x$new_path" = x; then
16832    # Oops. Which didn't find the executable.
16833    # The splitting of arguments from the executable at a space might have been incorrect,
16834    # since paths with space are more likely in Windows. Give it another try with the whole
16835    # argument.
16836    path="$complete"
16837    arguments="EOL"
16838    new_path=`$CYGPATH -u "$path"`
16839    new_path=`$WHICH "$new_path" 2> /dev/null`
16840    # bat and cmd files are not always considered executable in cygwin causing which
16841    # to not find them
16842    if test "x$new_path" = x \
16843        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16844        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16845      new_path=`$CYGPATH -u "$path"`
16846    fi
16847    if test "x$new_path" = x; then
16848      # It's still not found. Now this is an unrecoverable error.
16849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16850$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16851      has_space=`$ECHO "$complete" | $GREP " "`
16852      if test "x$has_space" != x; then
16853        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16854$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16855      fi
16856      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16857    fi
16858  fi
16859
16860  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16861  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16862  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16863  # "foo.exe" is OK but "foo" is an error.
16864  #
16865  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16866  # It is also a way to make sure we got the proper file name for the real test later on.
16867  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16868  if test "x$test_shortpath" = x; then
16869    # Short path failed, file does not exist as specified.
16870    # Try adding .exe or .cmd
16871    if test -f "${new_path}.exe"; then
16872      input_to_shortpath="${new_path}.exe"
16873    elif test -f "${new_path}.cmd"; then
16874      input_to_shortpath="${new_path}.cmd"
16875    else
16876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16877$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16878      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16879$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16880      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16881    fi
16882  else
16883    input_to_shortpath="$new_path"
16884  fi
16885
16886  # Call helper function which possibly converts this using DOS-style short mode.
16887  # If so, the updated path is stored in $new_path.
16888  new_path="$input_to_shortpath"
16889
16890  input_path="$input_to_shortpath"
16891  # Check if we need to convert this using DOS-style short mode. If the path
16892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16893  # take no chances and rewrite it.
16894  # Note: m4 eats our [], so we need to use [ and ] instead.
16895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16896  if test "x$has_forbidden_chars" != x; then
16897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16898    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16899    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16900    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16901      # Going to short mode and back again did indeed matter. Since short mode is
16902      # case insensitive, let's make it lowercase to improve readability.
16903      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16904      # Now convert it back to Unix-style (cygpath)
16905      input_path=`$CYGPATH -u "$shortmode_path"`
16906      new_path="$input_path"
16907    fi
16908  fi
16909
16910  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16911  if test "x$test_cygdrive_prefix" = x; then
16912    # As a simple fix, exclude /usr/bin since it's not a real path.
16913    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16914      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16915      # a path prefixed by /cygdrive for fixpath to work.
16916      new_path="$CYGWIN_ROOT_PATH$input_path"
16917    fi
16918  fi
16919
16920  # remove trailing .exe if any
16921  new_path="${new_path/%.exe/}"
16922
16923    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16924
16925  # First separate the path from the arguments. This will split at the first
16926  # space.
16927  complete="$FOUND_MAKE"
16928  path="${complete%% *}"
16929  tmp="$complete EOL"
16930  arguments="${tmp#* }"
16931
16932  # Input might be given as Windows format, start by converting to
16933  # unix format.
16934  new_path="$path"
16935
16936  windows_path="$new_path"
16937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16938    unix_path=`$CYGPATH -u "$windows_path"`
16939    new_path="$unix_path"
16940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16942    new_path="$unix_path"
16943  fi
16944
16945
16946  # Now try to locate executable using which
16947  new_path=`$WHICH "$new_path" 2> /dev/null`
16948
16949  if test "x$new_path" = x; then
16950    # Oops. Which didn't find the executable.
16951    # The splitting of arguments from the executable at a space might have been incorrect,
16952    # since paths with space are more likely in Windows. Give it another try with the whole
16953    # argument.
16954    path="$complete"
16955    arguments="EOL"
16956    new_path="$path"
16957
16958  windows_path="$new_path"
16959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16960    unix_path=`$CYGPATH -u "$windows_path"`
16961    new_path="$unix_path"
16962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16964    new_path="$unix_path"
16965  fi
16966
16967
16968    new_path=`$WHICH "$new_path" 2> /dev/null`
16969    # bat and cmd files are not always considered executable in MSYS causing which
16970    # to not find them
16971    if test "x$new_path" = x \
16972        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16973        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16974      new_path="$path"
16975
16976  windows_path="$new_path"
16977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16978    unix_path=`$CYGPATH -u "$windows_path"`
16979    new_path="$unix_path"
16980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16982    new_path="$unix_path"
16983  fi
16984
16985    fi
16986
16987    if test "x$new_path" = x; then
16988      # It's still not found. Now this is an unrecoverable error.
16989      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16990$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16991      has_space=`$ECHO "$complete" | $GREP " "`
16992      if test "x$has_space" != x; then
16993        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16994$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16995      fi
16996      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16997    fi
16998  fi
16999
17000  # Now new_path has a complete unix path to the binary
17001  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17002    # Keep paths in /bin as-is, but remove trailing .exe if any
17003    new_path="${new_path/%.exe/}"
17004    # Do not save /bin paths to all_fixpath_prefixes!
17005  else
17006    # Not in mixed or Windows style, start by that.
17007    new_path=`cmd //c echo $new_path`
17008
17009  input_path="$new_path"
17010  # Check if we need to convert this using DOS-style short mode. If the path
17011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17012  # take no chances and rewrite it.
17013  # Note: m4 eats our [], so we need to use [ and ] instead.
17014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17015  if test "x$has_forbidden_chars" != x; then
17016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17017    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17018  fi
17019
17020    # Output is in $new_path
17021
17022  windows_path="$new_path"
17023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17024    unix_path=`$CYGPATH -u "$windows_path"`
17025    new_path="$unix_path"
17026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17028    new_path="$unix_path"
17029  fi
17030
17031    # remove trailing .exe if any
17032    new_path="${new_path/%.exe/}"
17033
17034    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17035    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17036  fi
17037
17038    else
17039      # We're on a unix platform. Hooray! :)
17040      # First separate the path from the arguments. This will split at the first
17041      # space.
17042      complete="$FOUND_MAKE"
17043      path="${complete%% *}"
17044      tmp="$complete EOL"
17045      arguments="${tmp#* }"
17046
17047      # Cannot rely on the command "which" here since it doesn't always work.
17048      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17049      if test -z "$is_absolute_path"; then
17050        # Path to executable is not absolute. Find it.
17051        IFS_save="$IFS"
17052        IFS=:
17053        for p in $PATH; do
17054          if test -f "$p/$path" && test -x "$p/$path"; then
17055            new_path="$p/$path"
17056            break
17057          fi
17058        done
17059        IFS="$IFS_save"
17060      else
17061        # This is an absolute path, we can use it without further modifications.
17062        new_path="$path"
17063      fi
17064
17065      if test "x$new_path" = x; then
17066        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17067$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17068        has_space=`$ECHO "$complete" | $GREP " "`
17069        if test "x$has_space" != x; then
17070          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17071$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17072        fi
17073        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17074      fi
17075    fi
17076
17077    # Now join together the path and the arguments once again
17078    if test "x$arguments" != xEOL; then
17079      new_complete="$new_path ${arguments% *}"
17080    else
17081      new_complete="$new_path"
17082    fi
17083
17084    if test "x$complete" != "x$new_complete"; then
17085      FOUND_MAKE="$new_complete"
17086      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17087$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17088    fi
17089  fi
17090
17091        fi
17092      fi
17093    fi
17094  fi
17095
17096
17097    if test "x$FOUND_MAKE" = x; then
17098      for ac_prog in make
17099do
17100  # Extract the first word of "$ac_prog", so it can be a program name with args.
17101set dummy $ac_prog; ac_word=$2
17102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17103$as_echo_n "checking for $ac_word... " >&6; }
17104if ${ac_cv_path_CHECK_MAKE+:} false; then :
17105  $as_echo_n "(cached) " >&6
17106else
17107  case $CHECK_MAKE in
17108  [\\/]* | ?:[\\/]*)
17109  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17110  ;;
17111  *)
17112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17113for as_dir in $PATH
17114do
17115  IFS=$as_save_IFS
17116  test -z "$as_dir" && as_dir=.
17117    for ac_exec_ext in '' $ac_executable_extensions; do
17118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17119    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17121    break 2
17122  fi
17123done
17124  done
17125IFS=$as_save_IFS
17126
17127  ;;
17128esac
17129fi
17130CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17131if test -n "$CHECK_MAKE"; then
17132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17133$as_echo "$CHECK_MAKE" >&6; }
17134else
17135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17136$as_echo "no" >&6; }
17137fi
17138
17139
17140  test -n "$CHECK_MAKE" && break
17141done
17142
17143
17144  MAKE_CANDIDATE=""$CHECK_MAKE""
17145  DESCRIPTION="make in PATH"
17146
17147  # On Cygwin, we require a newer version of make than on other platforms
17148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17149    MAKE_VERSION_EXPR="-e 4\."
17150    MAKE_REQUIRED_VERSION="4.0"
17151   else
17152    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17153    MAKE_REQUIRED_VERSION="3.81"
17154  fi
17155
17156  if test "x$MAKE_CANDIDATE" != x; then
17157    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17158$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17159    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17160    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17161    if test "x$IS_GNU_MAKE" = x; then
17162      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17163$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17164    else
17165      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17166      if test "x$IS_MODERN_MAKE" = x; then
17167        { $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
17168$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;}
17169      else
17170        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17171          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17172            MAKE_EXPECTED_ENV='cygwin'
17173          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17174            MAKE_EXPECTED_ENV='msys'
17175          else
17176            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17177          fi
17178          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17179          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17180        else
17181          # Not relevant for non-Windows
17182          IS_MAKE_CORRECT_ENV=true
17183        fi
17184        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17185          { $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
17186$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;}
17187        else
17188          FOUND_MAKE=$MAKE_CANDIDATE
17189
17190  # Only process if variable expands to non-empty
17191
17192  if test "x$FOUND_MAKE" != x; then
17193    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17194
17195  # First separate the path from the arguments. This will split at the first
17196  # space.
17197  complete="$FOUND_MAKE"
17198  path="${complete%% *}"
17199  tmp="$complete EOL"
17200  arguments="${tmp#* }"
17201
17202  # Input might be given as Windows format, start by converting to
17203  # unix format.
17204  new_path=`$CYGPATH -u "$path"`
17205
17206  # Now try to locate executable using which
17207  new_path=`$WHICH "$new_path" 2> /dev/null`
17208  # bat and cmd files are not always considered executable in cygwin causing which
17209  # to not find them
17210  if test "x$new_path" = x \
17211      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17212      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17213    new_path=`$CYGPATH -u "$path"`
17214  fi
17215  if test "x$new_path" = x; then
17216    # Oops. Which didn't find the executable.
17217    # The splitting of arguments from the executable at a space might have been incorrect,
17218    # since paths with space are more likely in Windows. Give it another try with the whole
17219    # argument.
17220    path="$complete"
17221    arguments="EOL"
17222    new_path=`$CYGPATH -u "$path"`
17223    new_path=`$WHICH "$new_path" 2> /dev/null`
17224    # bat and cmd files are not always considered executable in cygwin causing which
17225    # to not find them
17226    if test "x$new_path" = x \
17227        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17228        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17229      new_path=`$CYGPATH -u "$path"`
17230    fi
17231    if test "x$new_path" = x; then
17232      # It's still not found. Now this is an unrecoverable error.
17233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17234$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17235      has_space=`$ECHO "$complete" | $GREP " "`
17236      if test "x$has_space" != x; then
17237        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17238$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17239      fi
17240      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17241    fi
17242  fi
17243
17244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17247  # "foo.exe" is OK but "foo" is an error.
17248  #
17249  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17250  # It is also a way to make sure we got the proper file name for the real test later on.
17251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17252  if test "x$test_shortpath" = x; then
17253    # Short path failed, file does not exist as specified.
17254    # Try adding .exe or .cmd
17255    if test -f "${new_path}.exe"; then
17256      input_to_shortpath="${new_path}.exe"
17257    elif test -f "${new_path}.cmd"; then
17258      input_to_shortpath="${new_path}.cmd"
17259    else
17260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17261$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17262      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17263$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17264      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17265    fi
17266  else
17267    input_to_shortpath="$new_path"
17268  fi
17269
17270  # Call helper function which possibly converts this using DOS-style short mode.
17271  # If so, the updated path is stored in $new_path.
17272  new_path="$input_to_shortpath"
17273
17274  input_path="$input_to_shortpath"
17275  # Check if we need to convert this using DOS-style short mode. If the path
17276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17277  # take no chances and rewrite it.
17278  # Note: m4 eats our [], so we need to use [ and ] instead.
17279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17280  if test "x$has_forbidden_chars" != x; then
17281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17285      # Going to short mode and back again did indeed matter. Since short mode is
17286      # case insensitive, let's make it lowercase to improve readability.
17287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17288      # Now convert it back to Unix-style (cygpath)
17289      input_path=`$CYGPATH -u "$shortmode_path"`
17290      new_path="$input_path"
17291    fi
17292  fi
17293
17294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17295  if test "x$test_cygdrive_prefix" = x; then
17296    # As a simple fix, exclude /usr/bin since it's not a real path.
17297    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17299      # a path prefixed by /cygdrive for fixpath to work.
17300      new_path="$CYGWIN_ROOT_PATH$input_path"
17301    fi
17302  fi
17303
17304  # remove trailing .exe if any
17305  new_path="${new_path/%.exe/}"
17306
17307    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17308
17309  # First separate the path from the arguments. This will split at the first
17310  # space.
17311  complete="$FOUND_MAKE"
17312  path="${complete%% *}"
17313  tmp="$complete EOL"
17314  arguments="${tmp#* }"
17315
17316  # Input might be given as Windows format, start by converting to
17317  # unix format.
17318  new_path="$path"
17319
17320  windows_path="$new_path"
17321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17322    unix_path=`$CYGPATH -u "$windows_path"`
17323    new_path="$unix_path"
17324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17326    new_path="$unix_path"
17327  fi
17328
17329
17330  # Now try to locate executable using which
17331  new_path=`$WHICH "$new_path" 2> /dev/null`
17332
17333  if test "x$new_path" = x; then
17334    # Oops. Which didn't find the executable.
17335    # The splitting of arguments from the executable at a space might have been incorrect,
17336    # since paths with space are more likely in Windows. Give it another try with the whole
17337    # argument.
17338    path="$complete"
17339    arguments="EOL"
17340    new_path="$path"
17341
17342  windows_path="$new_path"
17343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17344    unix_path=`$CYGPATH -u "$windows_path"`
17345    new_path="$unix_path"
17346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17348    new_path="$unix_path"
17349  fi
17350
17351
17352    new_path=`$WHICH "$new_path" 2> /dev/null`
17353    # bat and cmd files are not always considered executable in MSYS causing which
17354    # to not find them
17355    if test "x$new_path" = x \
17356        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17357        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17358      new_path="$path"
17359
17360  windows_path="$new_path"
17361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17362    unix_path=`$CYGPATH -u "$windows_path"`
17363    new_path="$unix_path"
17364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17366    new_path="$unix_path"
17367  fi
17368
17369    fi
17370
17371    if test "x$new_path" = x; then
17372      # It's still not found. Now this is an unrecoverable error.
17373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17374$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17375      has_space=`$ECHO "$complete" | $GREP " "`
17376      if test "x$has_space" != x; then
17377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17379      fi
17380      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17381    fi
17382  fi
17383
17384  # Now new_path has a complete unix path to the binary
17385  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17386    # Keep paths in /bin as-is, but remove trailing .exe if any
17387    new_path="${new_path/%.exe/}"
17388    # Do not save /bin paths to all_fixpath_prefixes!
17389  else
17390    # Not in mixed or Windows style, start by that.
17391    new_path=`cmd //c echo $new_path`
17392
17393  input_path="$new_path"
17394  # Check if we need to convert this using DOS-style short mode. If the path
17395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17396  # take no chances and rewrite it.
17397  # Note: m4 eats our [], so we need to use [ and ] instead.
17398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17399  if test "x$has_forbidden_chars" != x; then
17400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17402  fi
17403
17404    # Output is in $new_path
17405
17406  windows_path="$new_path"
17407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17408    unix_path=`$CYGPATH -u "$windows_path"`
17409    new_path="$unix_path"
17410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17412    new_path="$unix_path"
17413  fi
17414
17415    # remove trailing .exe if any
17416    new_path="${new_path/%.exe/}"
17417
17418    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17419    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17420  fi
17421
17422    else
17423      # We're on a unix platform. Hooray! :)
17424      # First separate the path from the arguments. This will split at the first
17425      # space.
17426      complete="$FOUND_MAKE"
17427      path="${complete%% *}"
17428      tmp="$complete EOL"
17429      arguments="${tmp#* }"
17430
17431      # Cannot rely on the command "which" here since it doesn't always work.
17432      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17433      if test -z "$is_absolute_path"; then
17434        # Path to executable is not absolute. Find it.
17435        IFS_save="$IFS"
17436        IFS=:
17437        for p in $PATH; do
17438          if test -f "$p/$path" && test -x "$p/$path"; then
17439            new_path="$p/$path"
17440            break
17441          fi
17442        done
17443        IFS="$IFS_save"
17444      else
17445        # This is an absolute path, we can use it without further modifications.
17446        new_path="$path"
17447      fi
17448
17449      if test "x$new_path" = x; then
17450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17451$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17452        has_space=`$ECHO "$complete" | $GREP " "`
17453        if test "x$has_space" != x; then
17454          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17455$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17456        fi
17457        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17458      fi
17459    fi
17460
17461    # Now join together the path and the arguments once again
17462    if test "x$arguments" != xEOL; then
17463      new_complete="$new_path ${arguments% *}"
17464    else
17465      new_complete="$new_path"
17466    fi
17467
17468    if test "x$complete" != "x$new_complete"; then
17469      FOUND_MAKE="$new_complete"
17470      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17471$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17472    fi
17473  fi
17474
17475        fi
17476      fi
17477    fi
17478  fi
17479
17480    fi
17481
17482    if test "x$FOUND_MAKE" = x; then
17483      if test "x$TOOLCHAIN_PATH" != x; then
17484        # We have a toolchain path, check that as well before giving up.
17485        OLD_PATH=$PATH
17486        PATH=$TOOLCHAIN_PATH:$PATH
17487        for ac_prog in gmake
17488do
17489  # Extract the first word of "$ac_prog", so it can be a program name with args.
17490set dummy $ac_prog; ac_word=$2
17491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17492$as_echo_n "checking for $ac_word... " >&6; }
17493if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17494  $as_echo_n "(cached) " >&6
17495else
17496  case $CHECK_TOOLSDIR_GMAKE in
17497  [\\/]* | ?:[\\/]*)
17498  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17499  ;;
17500  *)
17501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17502for as_dir in $PATH
17503do
17504  IFS=$as_save_IFS
17505  test -z "$as_dir" && as_dir=.
17506    for ac_exec_ext in '' $ac_executable_extensions; do
17507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17508    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17510    break 2
17511  fi
17512done
17513  done
17514IFS=$as_save_IFS
17515
17516  ;;
17517esac
17518fi
17519CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17520if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17522$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17523else
17524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17525$as_echo "no" >&6; }
17526fi
17527
17528
17529  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17530done
17531
17532
17533  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17534  DESCRIPTION="gmake in tools-dir"
17535
17536  # On Cygwin, we require a newer version of make than on other platforms
17537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17538    MAKE_VERSION_EXPR="-e 4\."
17539    MAKE_REQUIRED_VERSION="4.0"
17540   else
17541    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17542    MAKE_REQUIRED_VERSION="3.81"
17543  fi
17544
17545  if test "x$MAKE_CANDIDATE" != x; then
17546    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17547$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17548    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17549    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17550    if test "x$IS_GNU_MAKE" = x; then
17551      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17552$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17553    else
17554      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17555      if test "x$IS_MODERN_MAKE" = x; then
17556        { $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
17557$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;}
17558      else
17559        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17560          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17561            MAKE_EXPECTED_ENV='cygwin'
17562          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17563            MAKE_EXPECTED_ENV='msys'
17564          else
17565            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17566          fi
17567          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17568          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17569        else
17570          # Not relevant for non-Windows
17571          IS_MAKE_CORRECT_ENV=true
17572        fi
17573        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17574          { $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
17575$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;}
17576        else
17577          FOUND_MAKE=$MAKE_CANDIDATE
17578
17579  # Only process if variable expands to non-empty
17580
17581  if test "x$FOUND_MAKE" != x; then
17582    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17583
17584  # First separate the path from the arguments. This will split at the first
17585  # space.
17586  complete="$FOUND_MAKE"
17587  path="${complete%% *}"
17588  tmp="$complete EOL"
17589  arguments="${tmp#* }"
17590
17591  # Input might be given as Windows format, start by converting to
17592  # unix format.
17593  new_path=`$CYGPATH -u "$path"`
17594
17595  # Now try to locate executable using which
17596  new_path=`$WHICH "$new_path" 2> /dev/null`
17597  # bat and cmd files are not always considered executable in cygwin causing which
17598  # to not find them
17599  if test "x$new_path" = x \
17600      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17601      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17602    new_path=`$CYGPATH -u "$path"`
17603  fi
17604  if test "x$new_path" = x; then
17605    # Oops. Which didn't find the executable.
17606    # The splitting of arguments from the executable at a space might have been incorrect,
17607    # since paths with space are more likely in Windows. Give it another try with the whole
17608    # argument.
17609    path="$complete"
17610    arguments="EOL"
17611    new_path=`$CYGPATH -u "$path"`
17612    new_path=`$WHICH "$new_path" 2> /dev/null`
17613    # bat and cmd files are not always considered executable in cygwin causing which
17614    # to not find them
17615    if test "x$new_path" = x \
17616        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17617        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17618      new_path=`$CYGPATH -u "$path"`
17619    fi
17620    if test "x$new_path" = x; then
17621      # It's still not found. Now this is an unrecoverable error.
17622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17623$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17624      has_space=`$ECHO "$complete" | $GREP " "`
17625      if test "x$has_space" != x; then
17626        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17627$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17628      fi
17629      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17630    fi
17631  fi
17632
17633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17636  # "foo.exe" is OK but "foo" is an error.
17637  #
17638  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17639  # It is also a way to make sure we got the proper file name for the real test later on.
17640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17641  if test "x$test_shortpath" = x; then
17642    # Short path failed, file does not exist as specified.
17643    # Try adding .exe or .cmd
17644    if test -f "${new_path}.exe"; then
17645      input_to_shortpath="${new_path}.exe"
17646    elif test -f "${new_path}.cmd"; then
17647      input_to_shortpath="${new_path}.cmd"
17648    else
17649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17650$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17651      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17652$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17653      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17654    fi
17655  else
17656    input_to_shortpath="$new_path"
17657  fi
17658
17659  # Call helper function which possibly converts this using DOS-style short mode.
17660  # If so, the updated path is stored in $new_path.
17661  new_path="$input_to_shortpath"
17662
17663  input_path="$input_to_shortpath"
17664  # Check if we need to convert this using DOS-style short mode. If the path
17665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17666  # take no chances and rewrite it.
17667  # Note: m4 eats our [], so we need to use [ and ] instead.
17668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17669  if test "x$has_forbidden_chars" != x; then
17670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17671    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17672    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17673    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17674      # Going to short mode and back again did indeed matter. Since short mode is
17675      # case insensitive, let's make it lowercase to improve readability.
17676      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17677      # Now convert it back to Unix-style (cygpath)
17678      input_path=`$CYGPATH -u "$shortmode_path"`
17679      new_path="$input_path"
17680    fi
17681  fi
17682
17683  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17684  if test "x$test_cygdrive_prefix" = x; then
17685    # As a simple fix, exclude /usr/bin since it's not a real path.
17686    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17687      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17688      # a path prefixed by /cygdrive for fixpath to work.
17689      new_path="$CYGWIN_ROOT_PATH$input_path"
17690    fi
17691  fi
17692
17693  # remove trailing .exe if any
17694  new_path="${new_path/%.exe/}"
17695
17696    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17697
17698  # First separate the path from the arguments. This will split at the first
17699  # space.
17700  complete="$FOUND_MAKE"
17701  path="${complete%% *}"
17702  tmp="$complete EOL"
17703  arguments="${tmp#* }"
17704
17705  # Input might be given as Windows format, start by converting to
17706  # unix format.
17707  new_path="$path"
17708
17709  windows_path="$new_path"
17710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17711    unix_path=`$CYGPATH -u "$windows_path"`
17712    new_path="$unix_path"
17713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17715    new_path="$unix_path"
17716  fi
17717
17718
17719  # Now try to locate executable using which
17720  new_path=`$WHICH "$new_path" 2> /dev/null`
17721
17722  if test "x$new_path" = x; then
17723    # Oops. Which didn't find the executable.
17724    # The splitting of arguments from the executable at a space might have been incorrect,
17725    # since paths with space are more likely in Windows. Give it another try with the whole
17726    # argument.
17727    path="$complete"
17728    arguments="EOL"
17729    new_path="$path"
17730
17731  windows_path="$new_path"
17732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17733    unix_path=`$CYGPATH -u "$windows_path"`
17734    new_path="$unix_path"
17735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17737    new_path="$unix_path"
17738  fi
17739
17740
17741    new_path=`$WHICH "$new_path" 2> /dev/null`
17742    # bat and cmd files are not always considered executable in MSYS causing which
17743    # to not find them
17744    if test "x$new_path" = x \
17745        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17746        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17747      new_path="$path"
17748
17749  windows_path="$new_path"
17750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17751    unix_path=`$CYGPATH -u "$windows_path"`
17752    new_path="$unix_path"
17753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17755    new_path="$unix_path"
17756  fi
17757
17758    fi
17759
17760    if test "x$new_path" = x; then
17761      # It's still not found. Now this is an unrecoverable error.
17762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17763$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17764      has_space=`$ECHO "$complete" | $GREP " "`
17765      if test "x$has_space" != x; then
17766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17768      fi
17769      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17770    fi
17771  fi
17772
17773  # Now new_path has a complete unix path to the binary
17774  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17775    # Keep paths in /bin as-is, but remove trailing .exe if any
17776    new_path="${new_path/%.exe/}"
17777    # Do not save /bin paths to all_fixpath_prefixes!
17778  else
17779    # Not in mixed or Windows style, start by that.
17780    new_path=`cmd //c echo $new_path`
17781
17782  input_path="$new_path"
17783  # Check if we need to convert this using DOS-style short mode. If the path
17784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17785  # take no chances and rewrite it.
17786  # Note: m4 eats our [], so we need to use [ and ] instead.
17787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17788  if test "x$has_forbidden_chars" != x; then
17789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17791  fi
17792
17793    # Output is in $new_path
17794
17795  windows_path="$new_path"
17796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17797    unix_path=`$CYGPATH -u "$windows_path"`
17798    new_path="$unix_path"
17799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17801    new_path="$unix_path"
17802  fi
17803
17804    # remove trailing .exe if any
17805    new_path="${new_path/%.exe/}"
17806
17807    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17808    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17809  fi
17810
17811    else
17812      # We're on a unix platform. Hooray! :)
17813      # First separate the path from the arguments. This will split at the first
17814      # space.
17815      complete="$FOUND_MAKE"
17816      path="${complete%% *}"
17817      tmp="$complete EOL"
17818      arguments="${tmp#* }"
17819
17820      # Cannot rely on the command "which" here since it doesn't always work.
17821      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17822      if test -z "$is_absolute_path"; then
17823        # Path to executable is not absolute. Find it.
17824        IFS_save="$IFS"
17825        IFS=:
17826        for p in $PATH; do
17827          if test -f "$p/$path" && test -x "$p/$path"; then
17828            new_path="$p/$path"
17829            break
17830          fi
17831        done
17832        IFS="$IFS_save"
17833      else
17834        # This is an absolute path, we can use it without further modifications.
17835        new_path="$path"
17836      fi
17837
17838      if test "x$new_path" = x; then
17839        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17840$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17841        has_space=`$ECHO "$complete" | $GREP " "`
17842        if test "x$has_space" != x; then
17843          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17844$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17845        fi
17846        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17847      fi
17848    fi
17849
17850    # Now join together the path and the arguments once again
17851    if test "x$arguments" != xEOL; then
17852      new_complete="$new_path ${arguments% *}"
17853    else
17854      new_complete="$new_path"
17855    fi
17856
17857    if test "x$complete" != "x$new_complete"; then
17858      FOUND_MAKE="$new_complete"
17859      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17860$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17861    fi
17862  fi
17863
17864        fi
17865      fi
17866    fi
17867  fi
17868
17869        if test "x$FOUND_MAKE" = x; then
17870          for ac_prog in make
17871do
17872  # Extract the first word of "$ac_prog", so it can be a program name with args.
17873set dummy $ac_prog; ac_word=$2
17874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17875$as_echo_n "checking for $ac_word... " >&6; }
17876if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17877  $as_echo_n "(cached) " >&6
17878else
17879  case $CHECK_TOOLSDIR_MAKE in
17880  [\\/]* | ?:[\\/]*)
17881  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17882  ;;
17883  *)
17884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17885for as_dir in $PATH
17886do
17887  IFS=$as_save_IFS
17888  test -z "$as_dir" && as_dir=.
17889    for ac_exec_ext in '' $ac_executable_extensions; do
17890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17891    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17893    break 2
17894  fi
17895done
17896  done
17897IFS=$as_save_IFS
17898
17899  ;;
17900esac
17901fi
17902CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17903if test -n "$CHECK_TOOLSDIR_MAKE"; then
17904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17905$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17906else
17907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17908$as_echo "no" >&6; }
17909fi
17910
17911
17912  test -n "$CHECK_TOOLSDIR_MAKE" && break
17913done
17914
17915
17916  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17917  DESCRIPTION="make in tools-dir"
17918
17919  # On Cygwin, we require a newer version of make than on other platforms
17920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17921    MAKE_VERSION_EXPR="-e 4\."
17922    MAKE_REQUIRED_VERSION="4.0"
17923   else
17924    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17925    MAKE_REQUIRED_VERSION="3.81"
17926  fi
17927
17928  if test "x$MAKE_CANDIDATE" != x; then
17929    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17930$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17931    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17932    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17933    if test "x$IS_GNU_MAKE" = x; then
17934      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17935$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17936    else
17937      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17938      if test "x$IS_MODERN_MAKE" = x; then
17939        { $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
17940$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;}
17941      else
17942        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17943          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17944            MAKE_EXPECTED_ENV='cygwin'
17945          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17946            MAKE_EXPECTED_ENV='msys'
17947          else
17948            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17949          fi
17950          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17951          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17952        else
17953          # Not relevant for non-Windows
17954          IS_MAKE_CORRECT_ENV=true
17955        fi
17956        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17957          { $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
17958$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;}
17959        else
17960          FOUND_MAKE=$MAKE_CANDIDATE
17961
17962  # Only process if variable expands to non-empty
17963
17964  if test "x$FOUND_MAKE" != x; then
17965    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17966
17967  # First separate the path from the arguments. This will split at the first
17968  # space.
17969  complete="$FOUND_MAKE"
17970  path="${complete%% *}"
17971  tmp="$complete EOL"
17972  arguments="${tmp#* }"
17973
17974  # Input might be given as Windows format, start by converting to
17975  # unix format.
17976  new_path=`$CYGPATH -u "$path"`
17977
17978  # Now try to locate executable using which
17979  new_path=`$WHICH "$new_path" 2> /dev/null`
17980  # bat and cmd files are not always considered executable in cygwin causing which
17981  # to not find them
17982  if test "x$new_path" = x \
17983      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17984      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17985    new_path=`$CYGPATH -u "$path"`
17986  fi
17987  if test "x$new_path" = x; then
17988    # Oops. Which didn't find the executable.
17989    # The splitting of arguments from the executable at a space might have been incorrect,
17990    # since paths with space are more likely in Windows. Give it another try with the whole
17991    # argument.
17992    path="$complete"
17993    arguments="EOL"
17994    new_path=`$CYGPATH -u "$path"`
17995    new_path=`$WHICH "$new_path" 2> /dev/null`
17996    # bat and cmd files are not always considered executable in cygwin causing which
17997    # to not find them
17998    if test "x$new_path" = x \
17999        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18000        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18001      new_path=`$CYGPATH -u "$path"`
18002    fi
18003    if test "x$new_path" = x; then
18004      # It's still not found. Now this is an unrecoverable error.
18005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18006$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18007      has_space=`$ECHO "$complete" | $GREP " "`
18008      if test "x$has_space" != x; then
18009        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18010$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18011      fi
18012      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18013    fi
18014  fi
18015
18016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18019  # "foo.exe" is OK but "foo" is an error.
18020  #
18021  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18022  # It is also a way to make sure we got the proper file name for the real test later on.
18023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18024  if test "x$test_shortpath" = x; then
18025    # Short path failed, file does not exist as specified.
18026    # Try adding .exe or .cmd
18027    if test -f "${new_path}.exe"; then
18028      input_to_shortpath="${new_path}.exe"
18029    elif test -f "${new_path}.cmd"; then
18030      input_to_shortpath="${new_path}.cmd"
18031    else
18032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18033$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18034      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18035$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18036      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18037    fi
18038  else
18039    input_to_shortpath="$new_path"
18040  fi
18041
18042  # Call helper function which possibly converts this using DOS-style short mode.
18043  # If so, the updated path is stored in $new_path.
18044  new_path="$input_to_shortpath"
18045
18046  input_path="$input_to_shortpath"
18047  # Check if we need to convert this using DOS-style short mode. If the path
18048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18049  # take no chances and rewrite it.
18050  # Note: m4 eats our [], so we need to use [ and ] instead.
18051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18052  if test "x$has_forbidden_chars" != x; then
18053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18057      # Going to short mode and back again did indeed matter. Since short mode is
18058      # case insensitive, let's make it lowercase to improve readability.
18059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18060      # Now convert it back to Unix-style (cygpath)
18061      input_path=`$CYGPATH -u "$shortmode_path"`
18062      new_path="$input_path"
18063    fi
18064  fi
18065
18066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18067  if test "x$test_cygdrive_prefix" = x; then
18068    # As a simple fix, exclude /usr/bin since it's not a real path.
18069    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18071      # a path prefixed by /cygdrive for fixpath to work.
18072      new_path="$CYGWIN_ROOT_PATH$input_path"
18073    fi
18074  fi
18075
18076  # remove trailing .exe if any
18077  new_path="${new_path/%.exe/}"
18078
18079    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18080
18081  # First separate the path from the arguments. This will split at the first
18082  # space.
18083  complete="$FOUND_MAKE"
18084  path="${complete%% *}"
18085  tmp="$complete EOL"
18086  arguments="${tmp#* }"
18087
18088  # Input might be given as Windows format, start by converting to
18089  # unix format.
18090  new_path="$path"
18091
18092  windows_path="$new_path"
18093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18094    unix_path=`$CYGPATH -u "$windows_path"`
18095    new_path="$unix_path"
18096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18098    new_path="$unix_path"
18099  fi
18100
18101
18102  # Now try to locate executable using which
18103  new_path=`$WHICH "$new_path" 2> /dev/null`
18104
18105  if test "x$new_path" = x; then
18106    # Oops. Which didn't find the executable.
18107    # The splitting of arguments from the executable at a space might have been incorrect,
18108    # since paths with space are more likely in Windows. Give it another try with the whole
18109    # argument.
18110    path="$complete"
18111    arguments="EOL"
18112    new_path="$path"
18113
18114  windows_path="$new_path"
18115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18116    unix_path=`$CYGPATH -u "$windows_path"`
18117    new_path="$unix_path"
18118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18120    new_path="$unix_path"
18121  fi
18122
18123
18124    new_path=`$WHICH "$new_path" 2> /dev/null`
18125    # bat and cmd files are not always considered executable in MSYS causing which
18126    # to not find them
18127    if test "x$new_path" = x \
18128        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18129        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18130      new_path="$path"
18131
18132  windows_path="$new_path"
18133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18134    unix_path=`$CYGPATH -u "$windows_path"`
18135    new_path="$unix_path"
18136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18138    new_path="$unix_path"
18139  fi
18140
18141    fi
18142
18143    if test "x$new_path" = x; then
18144      # It's still not found. Now this is an unrecoverable error.
18145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18146$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18147      has_space=`$ECHO "$complete" | $GREP " "`
18148      if test "x$has_space" != x; then
18149        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18150$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18151      fi
18152      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18153    fi
18154  fi
18155
18156  # Now new_path has a complete unix path to the binary
18157  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18158    # Keep paths in /bin as-is, but remove trailing .exe if any
18159    new_path="${new_path/%.exe/}"
18160    # Do not save /bin paths to all_fixpath_prefixes!
18161  else
18162    # Not in mixed or Windows style, start by that.
18163    new_path=`cmd //c echo $new_path`
18164
18165  input_path="$new_path"
18166  # Check if we need to convert this using DOS-style short mode. If the path
18167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18168  # take no chances and rewrite it.
18169  # Note: m4 eats our [], so we need to use [ and ] instead.
18170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18171  if test "x$has_forbidden_chars" != x; then
18172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18174  fi
18175
18176    # Output is in $new_path
18177
18178  windows_path="$new_path"
18179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18180    unix_path=`$CYGPATH -u "$windows_path"`
18181    new_path="$unix_path"
18182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18184    new_path="$unix_path"
18185  fi
18186
18187    # remove trailing .exe if any
18188    new_path="${new_path/%.exe/}"
18189
18190    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18191    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18192  fi
18193
18194    else
18195      # We're on a unix platform. Hooray! :)
18196      # First separate the path from the arguments. This will split at the first
18197      # space.
18198      complete="$FOUND_MAKE"
18199      path="${complete%% *}"
18200      tmp="$complete EOL"
18201      arguments="${tmp#* }"
18202
18203      # Cannot rely on the command "which" here since it doesn't always work.
18204      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18205      if test -z "$is_absolute_path"; then
18206        # Path to executable is not absolute. Find it.
18207        IFS_save="$IFS"
18208        IFS=:
18209        for p in $PATH; do
18210          if test -f "$p/$path" && test -x "$p/$path"; then
18211            new_path="$p/$path"
18212            break
18213          fi
18214        done
18215        IFS="$IFS_save"
18216      else
18217        # This is an absolute path, we can use it without further modifications.
18218        new_path="$path"
18219      fi
18220
18221      if test "x$new_path" = x; then
18222        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18223$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18224        has_space=`$ECHO "$complete" | $GREP " "`
18225        if test "x$has_space" != x; then
18226          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18227$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18228        fi
18229        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18230      fi
18231    fi
18232
18233    # Now join together the path and the arguments once again
18234    if test "x$arguments" != xEOL; then
18235      new_complete="$new_path ${arguments% *}"
18236    else
18237      new_complete="$new_path"
18238    fi
18239
18240    if test "x$complete" != "x$new_complete"; then
18241      FOUND_MAKE="$new_complete"
18242      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18243$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18244    fi
18245  fi
18246
18247        fi
18248      fi
18249    fi
18250  fi
18251
18252        fi
18253        PATH=$OLD_PATH
18254      fi
18255    fi
18256
18257    if test "x$FOUND_MAKE" = x; then
18258      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
18259    fi
18260
18261  else
18262    # The variable is set, but is it from the command line or the environment?
18263
18264    # Try to remove the string !MAKE! from our list.
18265    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18266    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18267      # If it failed, the variable was not from the command line. Ignore it,
18268      # but warn the user (except for BASH, which is always set by the calling BASH).
18269      if test "xMAKE" != xBASH; then
18270        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18271$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18272      fi
18273      # Try to locate tool using the code snippet
18274
18275    # Try our hardest to locate a correct version of GNU make
18276    for ac_prog in gmake
18277do
18278  # Extract the first word of "$ac_prog", so it can be a program name with args.
18279set dummy $ac_prog; ac_word=$2
18280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18281$as_echo_n "checking for $ac_word... " >&6; }
18282if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18283  $as_echo_n "(cached) " >&6
18284else
18285  case $CHECK_GMAKE in
18286  [\\/]* | ?:[\\/]*)
18287  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18288  ;;
18289  *)
18290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18291for as_dir in $PATH
18292do
18293  IFS=$as_save_IFS
18294  test -z "$as_dir" && as_dir=.
18295    for ac_exec_ext in '' $ac_executable_extensions; do
18296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18297    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18299    break 2
18300  fi
18301done
18302  done
18303IFS=$as_save_IFS
18304
18305  ;;
18306esac
18307fi
18308CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18309if test -n "$CHECK_GMAKE"; then
18310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18311$as_echo "$CHECK_GMAKE" >&6; }
18312else
18313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18314$as_echo "no" >&6; }
18315fi
18316
18317
18318  test -n "$CHECK_GMAKE" && break
18319done
18320
18321
18322  MAKE_CANDIDATE=""$CHECK_GMAKE""
18323  DESCRIPTION="gmake in PATH"
18324
18325  # On Cygwin, we require a newer version of make than on other platforms
18326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18327    MAKE_VERSION_EXPR="-e 4\."
18328    MAKE_REQUIRED_VERSION="4.0"
18329   else
18330    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18331    MAKE_REQUIRED_VERSION="3.81"
18332  fi
18333
18334  if test "x$MAKE_CANDIDATE" != x; then
18335    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18336$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18337    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18338    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18339    if test "x$IS_GNU_MAKE" = x; then
18340      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18341$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18342    else
18343      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18344      if test "x$IS_MODERN_MAKE" = x; then
18345        { $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
18346$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;}
18347      else
18348        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18349          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18350            MAKE_EXPECTED_ENV='cygwin'
18351          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18352            MAKE_EXPECTED_ENV='msys'
18353          else
18354            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18355          fi
18356          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18357          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18358        else
18359          # Not relevant for non-Windows
18360          IS_MAKE_CORRECT_ENV=true
18361        fi
18362        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18363          { $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
18364$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;}
18365        else
18366          FOUND_MAKE=$MAKE_CANDIDATE
18367
18368  # Only process if variable expands to non-empty
18369
18370  if test "x$FOUND_MAKE" != x; then
18371    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18372
18373  # First separate the path from the arguments. This will split at the first
18374  # space.
18375  complete="$FOUND_MAKE"
18376  path="${complete%% *}"
18377  tmp="$complete EOL"
18378  arguments="${tmp#* }"
18379
18380  # Input might be given as Windows format, start by converting to
18381  # unix format.
18382  new_path=`$CYGPATH -u "$path"`
18383
18384  # Now try to locate executable using which
18385  new_path=`$WHICH "$new_path" 2> /dev/null`
18386  # bat and cmd files are not always considered executable in cygwin causing which
18387  # to not find them
18388  if test "x$new_path" = x \
18389      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18390      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18391    new_path=`$CYGPATH -u "$path"`
18392  fi
18393  if test "x$new_path" = x; then
18394    # Oops. Which didn't find the executable.
18395    # The splitting of arguments from the executable at a space might have been incorrect,
18396    # since paths with space are more likely in Windows. Give it another try with the whole
18397    # argument.
18398    path="$complete"
18399    arguments="EOL"
18400    new_path=`$CYGPATH -u "$path"`
18401    new_path=`$WHICH "$new_path" 2> /dev/null`
18402    # bat and cmd files are not always considered executable in cygwin causing which
18403    # to not find them
18404    if test "x$new_path" = x \
18405        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18406        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18407      new_path=`$CYGPATH -u "$path"`
18408    fi
18409    if test "x$new_path" = x; then
18410      # It's still not found. Now this is an unrecoverable error.
18411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18412$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18413      has_space=`$ECHO "$complete" | $GREP " "`
18414      if test "x$has_space" != x; then
18415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18417      fi
18418      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18419    fi
18420  fi
18421
18422  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18423  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18424  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18425  # "foo.exe" is OK but "foo" is an error.
18426  #
18427  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18428  # It is also a way to make sure we got the proper file name for the real test later on.
18429  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18430  if test "x$test_shortpath" = x; then
18431    # Short path failed, file does not exist as specified.
18432    # Try adding .exe or .cmd
18433    if test -f "${new_path}.exe"; then
18434      input_to_shortpath="${new_path}.exe"
18435    elif test -f "${new_path}.cmd"; then
18436      input_to_shortpath="${new_path}.cmd"
18437    else
18438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18439$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18440      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18441$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18442      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18443    fi
18444  else
18445    input_to_shortpath="$new_path"
18446  fi
18447
18448  # Call helper function which possibly converts this using DOS-style short mode.
18449  # If so, the updated path is stored in $new_path.
18450  new_path="$input_to_shortpath"
18451
18452  input_path="$input_to_shortpath"
18453  # Check if we need to convert this using DOS-style short mode. If the path
18454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18455  # take no chances and rewrite it.
18456  # Note: m4 eats our [], so we need to use [ and ] instead.
18457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18458  if test "x$has_forbidden_chars" != x; then
18459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18460    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18461    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18462    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18463      # Going to short mode and back again did indeed matter. Since short mode is
18464      # case insensitive, let's make it lowercase to improve readability.
18465      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18466      # Now convert it back to Unix-style (cygpath)
18467      input_path=`$CYGPATH -u "$shortmode_path"`
18468      new_path="$input_path"
18469    fi
18470  fi
18471
18472  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18473  if test "x$test_cygdrive_prefix" = x; then
18474    # As a simple fix, exclude /usr/bin since it's not a real path.
18475    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18476      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18477      # a path prefixed by /cygdrive for fixpath to work.
18478      new_path="$CYGWIN_ROOT_PATH$input_path"
18479    fi
18480  fi
18481
18482  # remove trailing .exe if any
18483  new_path="${new_path/%.exe/}"
18484
18485    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18486
18487  # First separate the path from the arguments. This will split at the first
18488  # space.
18489  complete="$FOUND_MAKE"
18490  path="${complete%% *}"
18491  tmp="$complete EOL"
18492  arguments="${tmp#* }"
18493
18494  # Input might be given as Windows format, start by converting to
18495  # unix format.
18496  new_path="$path"
18497
18498  windows_path="$new_path"
18499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18500    unix_path=`$CYGPATH -u "$windows_path"`
18501    new_path="$unix_path"
18502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18504    new_path="$unix_path"
18505  fi
18506
18507
18508  # Now try to locate executable using which
18509  new_path=`$WHICH "$new_path" 2> /dev/null`
18510
18511  if test "x$new_path" = x; then
18512    # Oops. Which didn't find the executable.
18513    # The splitting of arguments from the executable at a space might have been incorrect,
18514    # since paths with space are more likely in Windows. Give it another try with the whole
18515    # argument.
18516    path="$complete"
18517    arguments="EOL"
18518    new_path="$path"
18519
18520  windows_path="$new_path"
18521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18522    unix_path=`$CYGPATH -u "$windows_path"`
18523    new_path="$unix_path"
18524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18526    new_path="$unix_path"
18527  fi
18528
18529
18530    new_path=`$WHICH "$new_path" 2> /dev/null`
18531    # bat and cmd files are not always considered executable in MSYS causing which
18532    # to not find them
18533    if test "x$new_path" = x \
18534        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18535        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18536      new_path="$path"
18537
18538  windows_path="$new_path"
18539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18540    unix_path=`$CYGPATH -u "$windows_path"`
18541    new_path="$unix_path"
18542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18544    new_path="$unix_path"
18545  fi
18546
18547    fi
18548
18549    if test "x$new_path" = x; then
18550      # It's still not found. Now this is an unrecoverable error.
18551      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18552$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18553      has_space=`$ECHO "$complete" | $GREP " "`
18554      if test "x$has_space" != x; then
18555        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18556$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18557      fi
18558      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18559    fi
18560  fi
18561
18562  # Now new_path has a complete unix path to the binary
18563  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18564    # Keep paths in /bin as-is, but remove trailing .exe if any
18565    new_path="${new_path/%.exe/}"
18566    # Do not save /bin paths to all_fixpath_prefixes!
18567  else
18568    # Not in mixed or Windows style, start by that.
18569    new_path=`cmd //c echo $new_path`
18570
18571  input_path="$new_path"
18572  # Check if we need to convert this using DOS-style short mode. If the path
18573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18574  # take no chances and rewrite it.
18575  # Note: m4 eats our [], so we need to use [ and ] instead.
18576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18577  if test "x$has_forbidden_chars" != x; then
18578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18579    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18580  fi
18581
18582    # Output is in $new_path
18583
18584  windows_path="$new_path"
18585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18586    unix_path=`$CYGPATH -u "$windows_path"`
18587    new_path="$unix_path"
18588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18590    new_path="$unix_path"
18591  fi
18592
18593    # remove trailing .exe if any
18594    new_path="${new_path/%.exe/}"
18595
18596    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18597    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18598  fi
18599
18600    else
18601      # We're on a unix platform. Hooray! :)
18602      # First separate the path from the arguments. This will split at the first
18603      # space.
18604      complete="$FOUND_MAKE"
18605      path="${complete%% *}"
18606      tmp="$complete EOL"
18607      arguments="${tmp#* }"
18608
18609      # Cannot rely on the command "which" here since it doesn't always work.
18610      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18611      if test -z "$is_absolute_path"; then
18612        # Path to executable is not absolute. Find it.
18613        IFS_save="$IFS"
18614        IFS=:
18615        for p in $PATH; do
18616          if test -f "$p/$path" && test -x "$p/$path"; then
18617            new_path="$p/$path"
18618            break
18619          fi
18620        done
18621        IFS="$IFS_save"
18622      else
18623        # This is an absolute path, we can use it without further modifications.
18624        new_path="$path"
18625      fi
18626
18627      if test "x$new_path" = x; then
18628        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18629$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18630        has_space=`$ECHO "$complete" | $GREP " "`
18631        if test "x$has_space" != x; then
18632          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18633$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18634        fi
18635        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18636      fi
18637    fi
18638
18639    # Now join together the path and the arguments once again
18640    if test "x$arguments" != xEOL; then
18641      new_complete="$new_path ${arguments% *}"
18642    else
18643      new_complete="$new_path"
18644    fi
18645
18646    if test "x$complete" != "x$new_complete"; then
18647      FOUND_MAKE="$new_complete"
18648      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18649$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18650    fi
18651  fi
18652
18653        fi
18654      fi
18655    fi
18656  fi
18657
18658
18659    if test "x$FOUND_MAKE" = x; then
18660      for ac_prog in make
18661do
18662  # Extract the first word of "$ac_prog", so it can be a program name with args.
18663set dummy $ac_prog; ac_word=$2
18664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18665$as_echo_n "checking for $ac_word... " >&6; }
18666if ${ac_cv_path_CHECK_MAKE+:} false; then :
18667  $as_echo_n "(cached) " >&6
18668else
18669  case $CHECK_MAKE in
18670  [\\/]* | ?:[\\/]*)
18671  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18672  ;;
18673  *)
18674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18675for as_dir in $PATH
18676do
18677  IFS=$as_save_IFS
18678  test -z "$as_dir" && as_dir=.
18679    for ac_exec_ext in '' $ac_executable_extensions; do
18680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18681    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18683    break 2
18684  fi
18685done
18686  done
18687IFS=$as_save_IFS
18688
18689  ;;
18690esac
18691fi
18692CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18693if test -n "$CHECK_MAKE"; then
18694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18695$as_echo "$CHECK_MAKE" >&6; }
18696else
18697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18698$as_echo "no" >&6; }
18699fi
18700
18701
18702  test -n "$CHECK_MAKE" && break
18703done
18704
18705
18706  MAKE_CANDIDATE=""$CHECK_MAKE""
18707  DESCRIPTION="make in PATH"
18708
18709  # On Cygwin, we require a newer version of make than on other platforms
18710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18711    MAKE_VERSION_EXPR="-e 4\."
18712    MAKE_REQUIRED_VERSION="4.0"
18713   else
18714    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18715    MAKE_REQUIRED_VERSION="3.81"
18716  fi
18717
18718  if test "x$MAKE_CANDIDATE" != x; then
18719    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18720$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18721    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18722    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18723    if test "x$IS_GNU_MAKE" = x; then
18724      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18725$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18726    else
18727      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18728      if test "x$IS_MODERN_MAKE" = x; then
18729        { $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
18730$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;}
18731      else
18732        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18733          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18734            MAKE_EXPECTED_ENV='cygwin'
18735          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18736            MAKE_EXPECTED_ENV='msys'
18737          else
18738            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18739          fi
18740          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18741          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18742        else
18743          # Not relevant for non-Windows
18744          IS_MAKE_CORRECT_ENV=true
18745        fi
18746        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18747          { $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
18748$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;}
18749        else
18750          FOUND_MAKE=$MAKE_CANDIDATE
18751
18752  # Only process if variable expands to non-empty
18753
18754  if test "x$FOUND_MAKE" != x; then
18755    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18756
18757  # First separate the path from the arguments. This will split at the first
18758  # space.
18759  complete="$FOUND_MAKE"
18760  path="${complete%% *}"
18761  tmp="$complete EOL"
18762  arguments="${tmp#* }"
18763
18764  # Input might be given as Windows format, start by converting to
18765  # unix format.
18766  new_path=`$CYGPATH -u "$path"`
18767
18768  # Now try to locate executable using which
18769  new_path=`$WHICH "$new_path" 2> /dev/null`
18770  # bat and cmd files are not always considered executable in cygwin causing which
18771  # to not find them
18772  if test "x$new_path" = x \
18773      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18774      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18775    new_path=`$CYGPATH -u "$path"`
18776  fi
18777  if test "x$new_path" = x; then
18778    # Oops. Which didn't find the executable.
18779    # The splitting of arguments from the executable at a space might have been incorrect,
18780    # since paths with space are more likely in Windows. Give it another try with the whole
18781    # argument.
18782    path="$complete"
18783    arguments="EOL"
18784    new_path=`$CYGPATH -u "$path"`
18785    new_path=`$WHICH "$new_path" 2> /dev/null`
18786    # bat and cmd files are not always considered executable in cygwin causing which
18787    # to not find them
18788    if test "x$new_path" = x \
18789        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18790        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18791      new_path=`$CYGPATH -u "$path"`
18792    fi
18793    if test "x$new_path" = x; then
18794      # It's still not found. Now this is an unrecoverable error.
18795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18796$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18797      has_space=`$ECHO "$complete" | $GREP " "`
18798      if test "x$has_space" != x; then
18799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18801      fi
18802      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18803    fi
18804  fi
18805
18806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18809  # "foo.exe" is OK but "foo" is an error.
18810  #
18811  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18812  # It is also a way to make sure we got the proper file name for the real test later on.
18813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18814  if test "x$test_shortpath" = x; then
18815    # Short path failed, file does not exist as specified.
18816    # Try adding .exe or .cmd
18817    if test -f "${new_path}.exe"; then
18818      input_to_shortpath="${new_path}.exe"
18819    elif test -f "${new_path}.cmd"; then
18820      input_to_shortpath="${new_path}.cmd"
18821    else
18822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18823$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18824      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18825$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18826      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18827    fi
18828  else
18829    input_to_shortpath="$new_path"
18830  fi
18831
18832  # Call helper function which possibly converts this using DOS-style short mode.
18833  # If so, the updated path is stored in $new_path.
18834  new_path="$input_to_shortpath"
18835
18836  input_path="$input_to_shortpath"
18837  # Check if we need to convert this using DOS-style short mode. If the path
18838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18839  # take no chances and rewrite it.
18840  # Note: m4 eats our [], so we need to use [ and ] instead.
18841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18842  if test "x$has_forbidden_chars" != x; then
18843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18847      # Going to short mode and back again did indeed matter. Since short mode is
18848      # case insensitive, let's make it lowercase to improve readability.
18849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18850      # Now convert it back to Unix-style (cygpath)
18851      input_path=`$CYGPATH -u "$shortmode_path"`
18852      new_path="$input_path"
18853    fi
18854  fi
18855
18856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18857  if test "x$test_cygdrive_prefix" = x; then
18858    # As a simple fix, exclude /usr/bin since it's not a real path.
18859    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18861      # a path prefixed by /cygdrive for fixpath to work.
18862      new_path="$CYGWIN_ROOT_PATH$input_path"
18863    fi
18864  fi
18865
18866  # remove trailing .exe if any
18867  new_path="${new_path/%.exe/}"
18868
18869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18870
18871  # First separate the path from the arguments. This will split at the first
18872  # space.
18873  complete="$FOUND_MAKE"
18874  path="${complete%% *}"
18875  tmp="$complete EOL"
18876  arguments="${tmp#* }"
18877
18878  # Input might be given as Windows format, start by converting to
18879  # unix format.
18880  new_path="$path"
18881
18882  windows_path="$new_path"
18883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18884    unix_path=`$CYGPATH -u "$windows_path"`
18885    new_path="$unix_path"
18886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18888    new_path="$unix_path"
18889  fi
18890
18891
18892  # Now try to locate executable using which
18893  new_path=`$WHICH "$new_path" 2> /dev/null`
18894
18895  if test "x$new_path" = x; then
18896    # Oops. Which didn't find the executable.
18897    # The splitting of arguments from the executable at a space might have been incorrect,
18898    # since paths with space are more likely in Windows. Give it another try with the whole
18899    # argument.
18900    path="$complete"
18901    arguments="EOL"
18902    new_path="$path"
18903
18904  windows_path="$new_path"
18905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18906    unix_path=`$CYGPATH -u "$windows_path"`
18907    new_path="$unix_path"
18908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18910    new_path="$unix_path"
18911  fi
18912
18913
18914    new_path=`$WHICH "$new_path" 2> /dev/null`
18915    # bat and cmd files are not always considered executable in MSYS causing which
18916    # to not find them
18917    if test "x$new_path" = x \
18918        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18919        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18920      new_path="$path"
18921
18922  windows_path="$new_path"
18923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18924    unix_path=`$CYGPATH -u "$windows_path"`
18925    new_path="$unix_path"
18926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18928    new_path="$unix_path"
18929  fi
18930
18931    fi
18932
18933    if test "x$new_path" = x; then
18934      # It's still not found. Now this is an unrecoverable error.
18935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18936$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18937      has_space=`$ECHO "$complete" | $GREP " "`
18938      if test "x$has_space" != x; then
18939        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18940$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18941      fi
18942      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18943    fi
18944  fi
18945
18946  # Now new_path has a complete unix path to the binary
18947  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18948    # Keep paths in /bin as-is, but remove trailing .exe if any
18949    new_path="${new_path/%.exe/}"
18950    # Do not save /bin paths to all_fixpath_prefixes!
18951  else
18952    # Not in mixed or Windows style, start by that.
18953    new_path=`cmd //c echo $new_path`
18954
18955  input_path="$new_path"
18956  # Check if we need to convert this using DOS-style short mode. If the path
18957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18958  # take no chances and rewrite it.
18959  # Note: m4 eats our [], so we need to use [ and ] instead.
18960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18961  if test "x$has_forbidden_chars" != x; then
18962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18964  fi
18965
18966    # Output is in $new_path
18967
18968  windows_path="$new_path"
18969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18970    unix_path=`$CYGPATH -u "$windows_path"`
18971    new_path="$unix_path"
18972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18974    new_path="$unix_path"
18975  fi
18976
18977    # remove trailing .exe if any
18978    new_path="${new_path/%.exe/}"
18979
18980    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18981    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18982  fi
18983
18984    else
18985      # We're on a unix platform. Hooray! :)
18986      # First separate the path from the arguments. This will split at the first
18987      # space.
18988      complete="$FOUND_MAKE"
18989      path="${complete%% *}"
18990      tmp="$complete EOL"
18991      arguments="${tmp#* }"
18992
18993      # Cannot rely on the command "which" here since it doesn't always work.
18994      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18995      if test -z "$is_absolute_path"; then
18996        # Path to executable is not absolute. Find it.
18997        IFS_save="$IFS"
18998        IFS=:
18999        for p in $PATH; do
19000          if test -f "$p/$path" && test -x "$p/$path"; then
19001            new_path="$p/$path"
19002            break
19003          fi
19004        done
19005        IFS="$IFS_save"
19006      else
19007        # This is an absolute path, we can use it without further modifications.
19008        new_path="$path"
19009      fi
19010
19011      if test "x$new_path" = x; then
19012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19013$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19014        has_space=`$ECHO "$complete" | $GREP " "`
19015        if test "x$has_space" != x; then
19016          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19017$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19018        fi
19019        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19020      fi
19021    fi
19022
19023    # Now join together the path and the arguments once again
19024    if test "x$arguments" != xEOL; then
19025      new_complete="$new_path ${arguments% *}"
19026    else
19027      new_complete="$new_path"
19028    fi
19029
19030    if test "x$complete" != "x$new_complete"; then
19031      FOUND_MAKE="$new_complete"
19032      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19033$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19034    fi
19035  fi
19036
19037        fi
19038      fi
19039    fi
19040  fi
19041
19042    fi
19043
19044    if test "x$FOUND_MAKE" = x; then
19045      if test "x$TOOLCHAIN_PATH" != x; then
19046        # We have a toolchain path, check that as well before giving up.
19047        OLD_PATH=$PATH
19048        PATH=$TOOLCHAIN_PATH:$PATH
19049        for ac_prog in gmake
19050do
19051  # Extract the first word of "$ac_prog", so it can be a program name with args.
19052set dummy $ac_prog; ac_word=$2
19053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19054$as_echo_n "checking for $ac_word... " >&6; }
19055if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19056  $as_echo_n "(cached) " >&6
19057else
19058  case $CHECK_TOOLSDIR_GMAKE in
19059  [\\/]* | ?:[\\/]*)
19060  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19061  ;;
19062  *)
19063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19064for as_dir in $PATH
19065do
19066  IFS=$as_save_IFS
19067  test -z "$as_dir" && as_dir=.
19068    for ac_exec_ext in '' $ac_executable_extensions; do
19069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19070    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19072    break 2
19073  fi
19074done
19075  done
19076IFS=$as_save_IFS
19077
19078  ;;
19079esac
19080fi
19081CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19082if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19084$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19085else
19086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19087$as_echo "no" >&6; }
19088fi
19089
19090
19091  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19092done
19093
19094
19095  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19096  DESCRIPTION="gmake in tools-dir"
19097
19098  # On Cygwin, we require a newer version of make than on other platforms
19099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19100    MAKE_VERSION_EXPR="-e 4\."
19101    MAKE_REQUIRED_VERSION="4.0"
19102   else
19103    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19104    MAKE_REQUIRED_VERSION="3.81"
19105  fi
19106
19107  if test "x$MAKE_CANDIDATE" != x; then
19108    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19109$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19110    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19111    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19112    if test "x$IS_GNU_MAKE" = x; then
19113      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19114$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19115    else
19116      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19117      if test "x$IS_MODERN_MAKE" = x; then
19118        { $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
19119$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;}
19120      else
19121        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19122          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19123            MAKE_EXPECTED_ENV='cygwin'
19124          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19125            MAKE_EXPECTED_ENV='msys'
19126          else
19127            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19128          fi
19129          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19130          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19131        else
19132          # Not relevant for non-Windows
19133          IS_MAKE_CORRECT_ENV=true
19134        fi
19135        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19136          { $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
19137$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;}
19138        else
19139          FOUND_MAKE=$MAKE_CANDIDATE
19140
19141  # Only process if variable expands to non-empty
19142
19143  if test "x$FOUND_MAKE" != x; then
19144    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19145
19146  # First separate the path from the arguments. This will split at the first
19147  # space.
19148  complete="$FOUND_MAKE"
19149  path="${complete%% *}"
19150  tmp="$complete EOL"
19151  arguments="${tmp#* }"
19152
19153  # Input might be given as Windows format, start by converting to
19154  # unix format.
19155  new_path=`$CYGPATH -u "$path"`
19156
19157  # Now try to locate executable using which
19158  new_path=`$WHICH "$new_path" 2> /dev/null`
19159  # bat and cmd files are not always considered executable in cygwin causing which
19160  # to not find them
19161  if test "x$new_path" = x \
19162      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19163      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19164    new_path=`$CYGPATH -u "$path"`
19165  fi
19166  if test "x$new_path" = x; then
19167    # Oops. Which didn't find the executable.
19168    # The splitting of arguments from the executable at a space might have been incorrect,
19169    # since paths with space are more likely in Windows. Give it another try with the whole
19170    # argument.
19171    path="$complete"
19172    arguments="EOL"
19173    new_path=`$CYGPATH -u "$path"`
19174    new_path=`$WHICH "$new_path" 2> /dev/null`
19175    # bat and cmd files are not always considered executable in cygwin causing which
19176    # to not find them
19177    if test "x$new_path" = x \
19178        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19179        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19180      new_path=`$CYGPATH -u "$path"`
19181    fi
19182    if test "x$new_path" = x; then
19183      # It's still not found. Now this is an unrecoverable error.
19184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19185$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19186      has_space=`$ECHO "$complete" | $GREP " "`
19187      if test "x$has_space" != x; then
19188        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19189$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19190      fi
19191      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19192    fi
19193  fi
19194
19195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19198  # "foo.exe" is OK but "foo" is an error.
19199  #
19200  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19201  # It is also a way to make sure we got the proper file name for the real test later on.
19202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19203  if test "x$test_shortpath" = x; then
19204    # Short path failed, file does not exist as specified.
19205    # Try adding .exe or .cmd
19206    if test -f "${new_path}.exe"; then
19207      input_to_shortpath="${new_path}.exe"
19208    elif test -f "${new_path}.cmd"; then
19209      input_to_shortpath="${new_path}.cmd"
19210    else
19211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19212$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19213      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19214$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19215      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19216    fi
19217  else
19218    input_to_shortpath="$new_path"
19219  fi
19220
19221  # Call helper function which possibly converts this using DOS-style short mode.
19222  # If so, the updated path is stored in $new_path.
19223  new_path="$input_to_shortpath"
19224
19225  input_path="$input_to_shortpath"
19226  # Check if we need to convert this using DOS-style short mode. If the path
19227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19228  # take no chances and rewrite it.
19229  # Note: m4 eats our [], so we need to use [ and ] instead.
19230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19231  if test "x$has_forbidden_chars" != x; then
19232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19236      # Going to short mode and back again did indeed matter. Since short mode is
19237      # case insensitive, let's make it lowercase to improve readability.
19238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19239      # Now convert it back to Unix-style (cygpath)
19240      input_path=`$CYGPATH -u "$shortmode_path"`
19241      new_path="$input_path"
19242    fi
19243  fi
19244
19245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19246  if test "x$test_cygdrive_prefix" = x; then
19247    # As a simple fix, exclude /usr/bin since it's not a real path.
19248    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19250      # a path prefixed by /cygdrive for fixpath to work.
19251      new_path="$CYGWIN_ROOT_PATH$input_path"
19252    fi
19253  fi
19254
19255  # remove trailing .exe if any
19256  new_path="${new_path/%.exe/}"
19257
19258    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19259
19260  # First separate the path from the arguments. This will split at the first
19261  # space.
19262  complete="$FOUND_MAKE"
19263  path="${complete%% *}"
19264  tmp="$complete EOL"
19265  arguments="${tmp#* }"
19266
19267  # Input might be given as Windows format, start by converting to
19268  # unix format.
19269  new_path="$path"
19270
19271  windows_path="$new_path"
19272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19273    unix_path=`$CYGPATH -u "$windows_path"`
19274    new_path="$unix_path"
19275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19277    new_path="$unix_path"
19278  fi
19279
19280
19281  # Now try to locate executable using which
19282  new_path=`$WHICH "$new_path" 2> /dev/null`
19283
19284  if test "x$new_path" = x; then
19285    # Oops. Which didn't find the executable.
19286    # The splitting of arguments from the executable at a space might have been incorrect,
19287    # since paths with space are more likely in Windows. Give it another try with the whole
19288    # argument.
19289    path="$complete"
19290    arguments="EOL"
19291    new_path="$path"
19292
19293  windows_path="$new_path"
19294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19295    unix_path=`$CYGPATH -u "$windows_path"`
19296    new_path="$unix_path"
19297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19299    new_path="$unix_path"
19300  fi
19301
19302
19303    new_path=`$WHICH "$new_path" 2> /dev/null`
19304    # bat and cmd files are not always considered executable in MSYS causing which
19305    # to not find them
19306    if test "x$new_path" = x \
19307        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19308        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19309      new_path="$path"
19310
19311  windows_path="$new_path"
19312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19313    unix_path=`$CYGPATH -u "$windows_path"`
19314    new_path="$unix_path"
19315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19317    new_path="$unix_path"
19318  fi
19319
19320    fi
19321
19322    if test "x$new_path" = x; then
19323      # It's still not found. Now this is an unrecoverable error.
19324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19325$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19326      has_space=`$ECHO "$complete" | $GREP " "`
19327      if test "x$has_space" != x; then
19328        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19329$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19330      fi
19331      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19332    fi
19333  fi
19334
19335  # Now new_path has a complete unix path to the binary
19336  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19337    # Keep paths in /bin as-is, but remove trailing .exe if any
19338    new_path="${new_path/%.exe/}"
19339    # Do not save /bin paths to all_fixpath_prefixes!
19340  else
19341    # Not in mixed or Windows style, start by that.
19342    new_path=`cmd //c echo $new_path`
19343
19344  input_path="$new_path"
19345  # Check if we need to convert this using DOS-style short mode. If the path
19346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19347  # take no chances and rewrite it.
19348  # Note: m4 eats our [], so we need to use [ and ] instead.
19349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19350  if test "x$has_forbidden_chars" != x; then
19351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19353  fi
19354
19355    # Output is in $new_path
19356
19357  windows_path="$new_path"
19358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19359    unix_path=`$CYGPATH -u "$windows_path"`
19360    new_path="$unix_path"
19361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19363    new_path="$unix_path"
19364  fi
19365
19366    # remove trailing .exe if any
19367    new_path="${new_path/%.exe/}"
19368
19369    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19370    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19371  fi
19372
19373    else
19374      # We're on a unix platform. Hooray! :)
19375      # First separate the path from the arguments. This will split at the first
19376      # space.
19377      complete="$FOUND_MAKE"
19378      path="${complete%% *}"
19379      tmp="$complete EOL"
19380      arguments="${tmp#* }"
19381
19382      # Cannot rely on the command "which" here since it doesn't always work.
19383      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19384      if test -z "$is_absolute_path"; then
19385        # Path to executable is not absolute. Find it.
19386        IFS_save="$IFS"
19387        IFS=:
19388        for p in $PATH; do
19389          if test -f "$p/$path" && test -x "$p/$path"; then
19390            new_path="$p/$path"
19391            break
19392          fi
19393        done
19394        IFS="$IFS_save"
19395      else
19396        # This is an absolute path, we can use it without further modifications.
19397        new_path="$path"
19398      fi
19399
19400      if test "x$new_path" = x; then
19401        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19402$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19403        has_space=`$ECHO "$complete" | $GREP " "`
19404        if test "x$has_space" != x; then
19405          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19406$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19407        fi
19408        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19409      fi
19410    fi
19411
19412    # Now join together the path and the arguments once again
19413    if test "x$arguments" != xEOL; then
19414      new_complete="$new_path ${arguments% *}"
19415    else
19416      new_complete="$new_path"
19417    fi
19418
19419    if test "x$complete" != "x$new_complete"; then
19420      FOUND_MAKE="$new_complete"
19421      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19422$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19423    fi
19424  fi
19425
19426        fi
19427      fi
19428    fi
19429  fi
19430
19431        if test "x$FOUND_MAKE" = x; then
19432          for ac_prog in make
19433do
19434  # Extract the first word of "$ac_prog", so it can be a program name with args.
19435set dummy $ac_prog; ac_word=$2
19436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19437$as_echo_n "checking for $ac_word... " >&6; }
19438if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19439  $as_echo_n "(cached) " >&6
19440else
19441  case $CHECK_TOOLSDIR_MAKE in
19442  [\\/]* | ?:[\\/]*)
19443  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19444  ;;
19445  *)
19446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19447for as_dir in $PATH
19448do
19449  IFS=$as_save_IFS
19450  test -z "$as_dir" && as_dir=.
19451    for ac_exec_ext in '' $ac_executable_extensions; do
19452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19453    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19455    break 2
19456  fi
19457done
19458  done
19459IFS=$as_save_IFS
19460
19461  ;;
19462esac
19463fi
19464CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19465if test -n "$CHECK_TOOLSDIR_MAKE"; then
19466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19467$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19468else
19469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19470$as_echo "no" >&6; }
19471fi
19472
19473
19474  test -n "$CHECK_TOOLSDIR_MAKE" && break
19475done
19476
19477
19478  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19479  DESCRIPTION="make in tools-dir"
19480
19481  # On Cygwin, we require a newer version of make than on other platforms
19482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19483    MAKE_VERSION_EXPR="-e 4\."
19484    MAKE_REQUIRED_VERSION="4.0"
19485   else
19486    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19487    MAKE_REQUIRED_VERSION="3.81"
19488  fi
19489
19490  if test "x$MAKE_CANDIDATE" != x; then
19491    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19492$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19493    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19494    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19495    if test "x$IS_GNU_MAKE" = x; then
19496      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19497$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19498    else
19499      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19500      if test "x$IS_MODERN_MAKE" = x; then
19501        { $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
19502$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;}
19503      else
19504        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19505          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19506            MAKE_EXPECTED_ENV='cygwin'
19507          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19508            MAKE_EXPECTED_ENV='msys'
19509          else
19510            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19511          fi
19512          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19513          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19514        else
19515          # Not relevant for non-Windows
19516          IS_MAKE_CORRECT_ENV=true
19517        fi
19518        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19519          { $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
19520$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;}
19521        else
19522          FOUND_MAKE=$MAKE_CANDIDATE
19523
19524  # Only process if variable expands to non-empty
19525
19526  if test "x$FOUND_MAKE" != x; then
19527    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19528
19529  # First separate the path from the arguments. This will split at the first
19530  # space.
19531  complete="$FOUND_MAKE"
19532  path="${complete%% *}"
19533  tmp="$complete EOL"
19534  arguments="${tmp#* }"
19535
19536  # Input might be given as Windows format, start by converting to
19537  # unix format.
19538  new_path=`$CYGPATH -u "$path"`
19539
19540  # Now try to locate executable using which
19541  new_path=`$WHICH "$new_path" 2> /dev/null`
19542  # bat and cmd files are not always considered executable in cygwin causing which
19543  # to not find them
19544  if test "x$new_path" = x \
19545      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19546      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19547    new_path=`$CYGPATH -u "$path"`
19548  fi
19549  if test "x$new_path" = x; then
19550    # Oops. Which didn't find the executable.
19551    # The splitting of arguments from the executable at a space might have been incorrect,
19552    # since paths with space are more likely in Windows. Give it another try with the whole
19553    # argument.
19554    path="$complete"
19555    arguments="EOL"
19556    new_path=`$CYGPATH -u "$path"`
19557    new_path=`$WHICH "$new_path" 2> /dev/null`
19558    # bat and cmd files are not always considered executable in cygwin causing which
19559    # to not find them
19560    if test "x$new_path" = x \
19561        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19562        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19563      new_path=`$CYGPATH -u "$path"`
19564    fi
19565    if test "x$new_path" = x; then
19566      # It's still not found. Now this is an unrecoverable error.
19567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19568$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19569      has_space=`$ECHO "$complete" | $GREP " "`
19570      if test "x$has_space" != x; then
19571        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19572$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19573      fi
19574      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19575    fi
19576  fi
19577
19578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19581  # "foo.exe" is OK but "foo" is an error.
19582  #
19583  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19584  # It is also a way to make sure we got the proper file name for the real test later on.
19585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19586  if test "x$test_shortpath" = x; then
19587    # Short path failed, file does not exist as specified.
19588    # Try adding .exe or .cmd
19589    if test -f "${new_path}.exe"; then
19590      input_to_shortpath="${new_path}.exe"
19591    elif test -f "${new_path}.cmd"; then
19592      input_to_shortpath="${new_path}.cmd"
19593    else
19594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19595$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19596      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19597$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19598      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19599    fi
19600  else
19601    input_to_shortpath="$new_path"
19602  fi
19603
19604  # Call helper function which possibly converts this using DOS-style short mode.
19605  # If so, the updated path is stored in $new_path.
19606  new_path="$input_to_shortpath"
19607
19608  input_path="$input_to_shortpath"
19609  # Check if we need to convert this using DOS-style short mode. If the path
19610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19611  # take no chances and rewrite it.
19612  # Note: m4 eats our [], so we need to use [ and ] instead.
19613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19614  if test "x$has_forbidden_chars" != x; then
19615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19619      # Going to short mode and back again did indeed matter. Since short mode is
19620      # case insensitive, let's make it lowercase to improve readability.
19621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19622      # Now convert it back to Unix-style (cygpath)
19623      input_path=`$CYGPATH -u "$shortmode_path"`
19624      new_path="$input_path"
19625    fi
19626  fi
19627
19628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19629  if test "x$test_cygdrive_prefix" = x; then
19630    # As a simple fix, exclude /usr/bin since it's not a real path.
19631    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19633      # a path prefixed by /cygdrive for fixpath to work.
19634      new_path="$CYGWIN_ROOT_PATH$input_path"
19635    fi
19636  fi
19637
19638  # remove trailing .exe if any
19639  new_path="${new_path/%.exe/}"
19640
19641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19642
19643  # First separate the path from the arguments. This will split at the first
19644  # space.
19645  complete="$FOUND_MAKE"
19646  path="${complete%% *}"
19647  tmp="$complete EOL"
19648  arguments="${tmp#* }"
19649
19650  # Input might be given as Windows format, start by converting to
19651  # unix format.
19652  new_path="$path"
19653
19654  windows_path="$new_path"
19655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19656    unix_path=`$CYGPATH -u "$windows_path"`
19657    new_path="$unix_path"
19658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19660    new_path="$unix_path"
19661  fi
19662
19663
19664  # Now try to locate executable using which
19665  new_path=`$WHICH "$new_path" 2> /dev/null`
19666
19667  if test "x$new_path" = x; then
19668    # Oops. Which didn't find the executable.
19669    # The splitting of arguments from the executable at a space might have been incorrect,
19670    # since paths with space are more likely in Windows. Give it another try with the whole
19671    # argument.
19672    path="$complete"
19673    arguments="EOL"
19674    new_path="$path"
19675
19676  windows_path="$new_path"
19677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19678    unix_path=`$CYGPATH -u "$windows_path"`
19679    new_path="$unix_path"
19680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19682    new_path="$unix_path"
19683  fi
19684
19685
19686    new_path=`$WHICH "$new_path" 2> /dev/null`
19687    # bat and cmd files are not always considered executable in MSYS causing which
19688    # to not find them
19689    if test "x$new_path" = x \
19690        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19691        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19692      new_path="$path"
19693
19694  windows_path="$new_path"
19695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19696    unix_path=`$CYGPATH -u "$windows_path"`
19697    new_path="$unix_path"
19698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19700    new_path="$unix_path"
19701  fi
19702
19703    fi
19704
19705    if test "x$new_path" = x; then
19706      # It's still not found. Now this is an unrecoverable error.
19707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19708$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19709      has_space=`$ECHO "$complete" | $GREP " "`
19710      if test "x$has_space" != x; then
19711        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19712$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19713      fi
19714      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19715    fi
19716  fi
19717
19718  # Now new_path has a complete unix path to the binary
19719  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19720    # Keep paths in /bin as-is, but remove trailing .exe if any
19721    new_path="${new_path/%.exe/}"
19722    # Do not save /bin paths to all_fixpath_prefixes!
19723  else
19724    # Not in mixed or Windows style, start by that.
19725    new_path=`cmd //c echo $new_path`
19726
19727  input_path="$new_path"
19728  # Check if we need to convert this using DOS-style short mode. If the path
19729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19730  # take no chances and rewrite it.
19731  # Note: m4 eats our [], so we need to use [ and ] instead.
19732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19733  if test "x$has_forbidden_chars" != x; then
19734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19736  fi
19737
19738    # Output is in $new_path
19739
19740  windows_path="$new_path"
19741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19742    unix_path=`$CYGPATH -u "$windows_path"`
19743    new_path="$unix_path"
19744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19746    new_path="$unix_path"
19747  fi
19748
19749    # remove trailing .exe if any
19750    new_path="${new_path/%.exe/}"
19751
19752    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19753    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19754  fi
19755
19756    else
19757      # We're on a unix platform. Hooray! :)
19758      # First separate the path from the arguments. This will split at the first
19759      # space.
19760      complete="$FOUND_MAKE"
19761      path="${complete%% *}"
19762      tmp="$complete EOL"
19763      arguments="${tmp#* }"
19764
19765      # Cannot rely on the command "which" here since it doesn't always work.
19766      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19767      if test -z "$is_absolute_path"; then
19768        # Path to executable is not absolute. Find it.
19769        IFS_save="$IFS"
19770        IFS=:
19771        for p in $PATH; do
19772          if test -f "$p/$path" && test -x "$p/$path"; then
19773            new_path="$p/$path"
19774            break
19775          fi
19776        done
19777        IFS="$IFS_save"
19778      else
19779        # This is an absolute path, we can use it without further modifications.
19780        new_path="$path"
19781      fi
19782
19783      if test "x$new_path" = x; then
19784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19785$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19786        has_space=`$ECHO "$complete" | $GREP " "`
19787        if test "x$has_space" != x; then
19788          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19789$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19790        fi
19791        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19792      fi
19793    fi
19794
19795    # Now join together the path and the arguments once again
19796    if test "x$arguments" != xEOL; then
19797      new_complete="$new_path ${arguments% *}"
19798    else
19799      new_complete="$new_path"
19800    fi
19801
19802    if test "x$complete" != "x$new_complete"; then
19803      FOUND_MAKE="$new_complete"
19804      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19805$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19806    fi
19807  fi
19808
19809        fi
19810      fi
19811    fi
19812  fi
19813
19814        fi
19815        PATH=$OLD_PATH
19816      fi
19817    fi
19818
19819    if test "x$FOUND_MAKE" = x; then
19820      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
19821    fi
19822
19823    else
19824      # If it succeeded, then it was overridden by the user. We will use it
19825      # for the tool.
19826
19827      # First remove it from the list of overridden variables, so we can test
19828      # for unknown variables in the end.
19829      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19830
19831      # Check if we try to supply an empty value
19832      if test "x$MAKE" = x; then
19833        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19834$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19835        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19836$as_echo_n "checking for MAKE... " >&6; }
19837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19838$as_echo "disabled" >&6; }
19839      else
19840        # Check if the provided tool contains a complete path.
19841        tool_specified="$MAKE"
19842        tool_basename="${tool_specified##*/}"
19843        if test "x$tool_basename" = "x$tool_specified"; then
19844          # A command without a complete path is provided, search $PATH.
19845          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19846$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19847          # Extract the first word of "$tool_basename", so it can be a program name with args.
19848set dummy $tool_basename; ac_word=$2
19849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19850$as_echo_n "checking for $ac_word... " >&6; }
19851if ${ac_cv_path_MAKE+:} false; then :
19852  $as_echo_n "(cached) " >&6
19853else
19854  case $MAKE in
19855  [\\/]* | ?:[\\/]*)
19856  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19857  ;;
19858  *)
19859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19860for as_dir in $PATH
19861do
19862  IFS=$as_save_IFS
19863  test -z "$as_dir" && as_dir=.
19864    for ac_exec_ext in '' $ac_executable_extensions; do
19865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19866    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19868    break 2
19869  fi
19870done
19871  done
19872IFS=$as_save_IFS
19873
19874  ;;
19875esac
19876fi
19877MAKE=$ac_cv_path_MAKE
19878if test -n "$MAKE"; then
19879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19880$as_echo "$MAKE" >&6; }
19881else
19882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19883$as_echo "no" >&6; }
19884fi
19885
19886
19887          if test "x$MAKE" = x; then
19888            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19889          fi
19890        else
19891          # Otherwise we believe it is a complete path. Use it as it is.
19892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19893$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19894          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19895$as_echo_n "checking for MAKE... " >&6; }
19896          if test ! -x "$tool_specified"; then
19897            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19898$as_echo "not found" >&6; }
19899            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19900          fi
19901          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19902$as_echo "$tool_specified" >&6; }
19903        fi
19904      fi
19905    fi
19906
19907    # If MAKE was set by user, verify the version
19908
19909  MAKE_CANDIDATE=""$MAKE""
19910  DESCRIPTION="user supplied MAKE=$MAKE"
19911
19912  # On Cygwin, we require a newer version of make than on other platforms
19913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19914    MAKE_VERSION_EXPR="-e 4\."
19915    MAKE_REQUIRED_VERSION="4.0"
19916   else
19917    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19918    MAKE_REQUIRED_VERSION="3.81"
19919  fi
19920
19921  if test "x$MAKE_CANDIDATE" != x; then
19922    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19923$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19924    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19925    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19926    if test "x$IS_GNU_MAKE" = x; then
19927      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19928$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19929    else
19930      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19931      if test "x$IS_MODERN_MAKE" = x; then
19932        { $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
19933$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;}
19934      else
19935        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19936          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19937            MAKE_EXPECTED_ENV='cygwin'
19938          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19939            MAKE_EXPECTED_ENV='msys'
19940          else
19941            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19942          fi
19943          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19944          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19945        else
19946          # Not relevant for non-Windows
19947          IS_MAKE_CORRECT_ENV=true
19948        fi
19949        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19950          { $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
19951$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;}
19952        else
19953          FOUND_MAKE=$MAKE_CANDIDATE
19954
19955  # Only process if variable expands to non-empty
19956
19957  if test "x$FOUND_MAKE" != x; then
19958    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19959
19960  # First separate the path from the arguments. This will split at the first
19961  # space.
19962  complete="$FOUND_MAKE"
19963  path="${complete%% *}"
19964  tmp="$complete EOL"
19965  arguments="${tmp#* }"
19966
19967  # Input might be given as Windows format, start by converting to
19968  # unix format.
19969  new_path=`$CYGPATH -u "$path"`
19970
19971  # Now try to locate executable using which
19972  new_path=`$WHICH "$new_path" 2> /dev/null`
19973  # bat and cmd files are not always considered executable in cygwin causing which
19974  # to not find them
19975  if test "x$new_path" = x \
19976      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19977      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19978    new_path=`$CYGPATH -u "$path"`
19979  fi
19980  if test "x$new_path" = x; then
19981    # Oops. Which didn't find the executable.
19982    # The splitting of arguments from the executable at a space might have been incorrect,
19983    # since paths with space are more likely in Windows. Give it another try with the whole
19984    # argument.
19985    path="$complete"
19986    arguments="EOL"
19987    new_path=`$CYGPATH -u "$path"`
19988    new_path=`$WHICH "$new_path" 2> /dev/null`
19989    # bat and cmd files are not always considered executable in cygwin causing which
19990    # to not find them
19991    if test "x$new_path" = x \
19992        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19993        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19994      new_path=`$CYGPATH -u "$path"`
19995    fi
19996    if test "x$new_path" = x; then
19997      # It's still not found. Now this is an unrecoverable error.
19998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19999$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20000      has_space=`$ECHO "$complete" | $GREP " "`
20001      if test "x$has_space" != x; then
20002        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20003$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20004      fi
20005      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20006    fi
20007  fi
20008
20009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20012  # "foo.exe" is OK but "foo" is an error.
20013  #
20014  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20015  # It is also a way to make sure we got the proper file name for the real test later on.
20016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20017  if test "x$test_shortpath" = x; then
20018    # Short path failed, file does not exist as specified.
20019    # Try adding .exe or .cmd
20020    if test -f "${new_path}.exe"; then
20021      input_to_shortpath="${new_path}.exe"
20022    elif test -f "${new_path}.cmd"; then
20023      input_to_shortpath="${new_path}.cmd"
20024    else
20025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20026$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20027      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20028$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20029      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20030    fi
20031  else
20032    input_to_shortpath="$new_path"
20033  fi
20034
20035  # Call helper function which possibly converts this using DOS-style short mode.
20036  # If so, the updated path is stored in $new_path.
20037  new_path="$input_to_shortpath"
20038
20039  input_path="$input_to_shortpath"
20040  # Check if we need to convert this using DOS-style short mode. If the path
20041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20042  # take no chances and rewrite it.
20043  # Note: m4 eats our [], so we need to use [ and ] instead.
20044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20045  if test "x$has_forbidden_chars" != x; then
20046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20047    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20048    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20049    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20050      # Going to short mode and back again did indeed matter. Since short mode is
20051      # case insensitive, let's make it lowercase to improve readability.
20052      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20053      # Now convert it back to Unix-style (cygpath)
20054      input_path=`$CYGPATH -u "$shortmode_path"`
20055      new_path="$input_path"
20056    fi
20057  fi
20058
20059  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20060  if test "x$test_cygdrive_prefix" = x; then
20061    # As a simple fix, exclude /usr/bin since it's not a real path.
20062    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20063      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20064      # a path prefixed by /cygdrive for fixpath to work.
20065      new_path="$CYGWIN_ROOT_PATH$input_path"
20066    fi
20067  fi
20068
20069  # remove trailing .exe if any
20070  new_path="${new_path/%.exe/}"
20071
20072    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20073
20074  # First separate the path from the arguments. This will split at the first
20075  # space.
20076  complete="$FOUND_MAKE"
20077  path="${complete%% *}"
20078  tmp="$complete EOL"
20079  arguments="${tmp#* }"
20080
20081  # Input might be given as Windows format, start by converting to
20082  # unix format.
20083  new_path="$path"
20084
20085  windows_path="$new_path"
20086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20087    unix_path=`$CYGPATH -u "$windows_path"`
20088    new_path="$unix_path"
20089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20091    new_path="$unix_path"
20092  fi
20093
20094
20095  # Now try to locate executable using which
20096  new_path=`$WHICH "$new_path" 2> /dev/null`
20097
20098  if test "x$new_path" = x; then
20099    # Oops. Which didn't find the executable.
20100    # The splitting of arguments from the executable at a space might have been incorrect,
20101    # since paths with space are more likely in Windows. Give it another try with the whole
20102    # argument.
20103    path="$complete"
20104    arguments="EOL"
20105    new_path="$path"
20106
20107  windows_path="$new_path"
20108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20109    unix_path=`$CYGPATH -u "$windows_path"`
20110    new_path="$unix_path"
20111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20113    new_path="$unix_path"
20114  fi
20115
20116
20117    new_path=`$WHICH "$new_path" 2> /dev/null`
20118    # bat and cmd files are not always considered executable in MSYS causing which
20119    # to not find them
20120    if test "x$new_path" = x \
20121        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20122        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20123      new_path="$path"
20124
20125  windows_path="$new_path"
20126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20127    unix_path=`$CYGPATH -u "$windows_path"`
20128    new_path="$unix_path"
20129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20131    new_path="$unix_path"
20132  fi
20133
20134    fi
20135
20136    if test "x$new_path" = x; then
20137      # It's still not found. Now this is an unrecoverable error.
20138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20139$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20140      has_space=`$ECHO "$complete" | $GREP " "`
20141      if test "x$has_space" != x; then
20142        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20143$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20144      fi
20145      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20146    fi
20147  fi
20148
20149  # Now new_path has a complete unix path to the binary
20150  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20151    # Keep paths in /bin as-is, but remove trailing .exe if any
20152    new_path="${new_path/%.exe/}"
20153    # Do not save /bin paths to all_fixpath_prefixes!
20154  else
20155    # Not in mixed or Windows style, start by that.
20156    new_path=`cmd //c echo $new_path`
20157
20158  input_path="$new_path"
20159  # Check if we need to convert this using DOS-style short mode. If the path
20160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20161  # take no chances and rewrite it.
20162  # Note: m4 eats our [], so we need to use [ and ] instead.
20163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20164  if test "x$has_forbidden_chars" != x; then
20165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20167  fi
20168
20169    # Output is in $new_path
20170
20171  windows_path="$new_path"
20172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20173    unix_path=`$CYGPATH -u "$windows_path"`
20174    new_path="$unix_path"
20175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20177    new_path="$unix_path"
20178  fi
20179
20180    # remove trailing .exe if any
20181    new_path="${new_path/%.exe/}"
20182
20183    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20184    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20185  fi
20186
20187    else
20188      # We're on a unix platform. Hooray! :)
20189      # First separate the path from the arguments. This will split at the first
20190      # space.
20191      complete="$FOUND_MAKE"
20192      path="${complete%% *}"
20193      tmp="$complete EOL"
20194      arguments="${tmp#* }"
20195
20196      # Cannot rely on the command "which" here since it doesn't always work.
20197      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20198      if test -z "$is_absolute_path"; then
20199        # Path to executable is not absolute. Find it.
20200        IFS_save="$IFS"
20201        IFS=:
20202        for p in $PATH; do
20203          if test -f "$p/$path" && test -x "$p/$path"; then
20204            new_path="$p/$path"
20205            break
20206          fi
20207        done
20208        IFS="$IFS_save"
20209      else
20210        # This is an absolute path, we can use it without further modifications.
20211        new_path="$path"
20212      fi
20213
20214      if test "x$new_path" = x; then
20215        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20216$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20217        has_space=`$ECHO "$complete" | $GREP " "`
20218        if test "x$has_space" != x; then
20219          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20220$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20221        fi
20222        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20223      fi
20224    fi
20225
20226    # Now join together the path and the arguments once again
20227    if test "x$arguments" != xEOL; then
20228      new_complete="$new_path ${arguments% *}"
20229    else
20230      new_complete="$new_path"
20231    fi
20232
20233    if test "x$complete" != "x$new_complete"; then
20234      FOUND_MAKE="$new_complete"
20235      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20236$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20237    fi
20238  fi
20239
20240        fi
20241      fi
20242    fi
20243  fi
20244
20245    if test "x$FOUND_MAKE" = x; then
20246      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20247    fi
20248
20249  fi
20250
20251
20252  MAKE=$FOUND_MAKE
20253
20254  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20255$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20256
20257
20258  # Check if make supports the output sync option and if so, setup using it.
20259  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20260$as_echo_n "checking if make --output-sync is supported... " >&6; }
20261  if $MAKE --version -O > /dev/null 2>&1; then
20262    OUTPUT_SYNC_SUPPORTED=true
20263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20264$as_echo "yes" >&6; }
20265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20266$as_echo_n "checking for output-sync value... " >&6; }
20267
20268# Check whether --with-output-sync was given.
20269if test "${with_output_sync+set}" = set; then :
20270  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20271fi
20272
20273    if test "x$OUTPUT_SYNC" = "x"; then
20274      OUTPUT_SYNC=none
20275    fi
20276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20277$as_echo "$OUTPUT_SYNC" >&6; }
20278    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20279      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20280    fi
20281  else
20282    OUTPUT_SYNC_SUPPORTED=false
20283    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20284$as_echo "no" >&6; }
20285  fi
20286
20287
20288
20289
20290
20291
20292  # Test if find supports -delete
20293  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20294$as_echo_n "checking if find supports -delete... " >&6; }
20295  FIND_DELETE="-delete"
20296
20297  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20298
20299  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20300
20301  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20302  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20303    # No, it does not.
20304    rm $DELETEDIR/TestIfFindSupportsDelete
20305    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20306      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20307      FIND_DELETE="-print | xargs rm"
20308    else
20309      FIND_DELETE="-exec rm \{\} \+"
20310    fi
20311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20312$as_echo "no" >&6; }
20313  else
20314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20315$as_echo "yes" >&6; }
20316  fi
20317  rmdir $DELETEDIR
20318
20319
20320
20321  # These tools might not be installed by default,
20322  # need hint on how to install them.
20323
20324
20325
20326  # Publish this variable in the help.
20327
20328
20329  if [ -z "${UNZIP+x}" ]; then
20330    # The variable is not set by user, try to locate tool using the code snippet
20331    for ac_prog in unzip
20332do
20333  # Extract the first word of "$ac_prog", so it can be a program name with args.
20334set dummy $ac_prog; ac_word=$2
20335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20336$as_echo_n "checking for $ac_word... " >&6; }
20337if ${ac_cv_path_UNZIP+:} false; then :
20338  $as_echo_n "(cached) " >&6
20339else
20340  case $UNZIP in
20341  [\\/]* | ?:[\\/]*)
20342  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20343  ;;
20344  *)
20345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20346for as_dir in $PATH
20347do
20348  IFS=$as_save_IFS
20349  test -z "$as_dir" && as_dir=.
20350    for ac_exec_ext in '' $ac_executable_extensions; do
20351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20352    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20354    break 2
20355  fi
20356done
20357  done
20358IFS=$as_save_IFS
20359
20360  ;;
20361esac
20362fi
20363UNZIP=$ac_cv_path_UNZIP
20364if test -n "$UNZIP"; then
20365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20366$as_echo "$UNZIP" >&6; }
20367else
20368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20369$as_echo "no" >&6; }
20370fi
20371
20372
20373  test -n "$UNZIP" && break
20374done
20375
20376  else
20377    # The variable is set, but is it from the command line or the environment?
20378
20379    # Try to remove the string !UNZIP! from our list.
20380    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20381    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20382      # If it failed, the variable was not from the command line. Ignore it,
20383      # but warn the user (except for BASH, which is always set by the calling BASH).
20384      if test "xUNZIP" != xBASH; then
20385        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20386$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20387      fi
20388      # Try to locate tool using the code snippet
20389      for ac_prog in unzip
20390do
20391  # Extract the first word of "$ac_prog", so it can be a program name with args.
20392set dummy $ac_prog; ac_word=$2
20393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20394$as_echo_n "checking for $ac_word... " >&6; }
20395if ${ac_cv_path_UNZIP+:} false; then :
20396  $as_echo_n "(cached) " >&6
20397else
20398  case $UNZIP in
20399  [\\/]* | ?:[\\/]*)
20400  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20401  ;;
20402  *)
20403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20404for as_dir in $PATH
20405do
20406  IFS=$as_save_IFS
20407  test -z "$as_dir" && as_dir=.
20408    for ac_exec_ext in '' $ac_executable_extensions; do
20409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20410    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20412    break 2
20413  fi
20414done
20415  done
20416IFS=$as_save_IFS
20417
20418  ;;
20419esac
20420fi
20421UNZIP=$ac_cv_path_UNZIP
20422if test -n "$UNZIP"; then
20423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20424$as_echo "$UNZIP" >&6; }
20425else
20426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20427$as_echo "no" >&6; }
20428fi
20429
20430
20431  test -n "$UNZIP" && break
20432done
20433
20434    else
20435      # If it succeeded, then it was overridden by the user. We will use it
20436      # for the tool.
20437
20438      # First remove it from the list of overridden variables, so we can test
20439      # for unknown variables in the end.
20440      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20441
20442      # Check if we try to supply an empty value
20443      if test "x$UNZIP" = x; then
20444        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20445$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20446        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20447$as_echo_n "checking for UNZIP... " >&6; }
20448        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20449$as_echo "disabled" >&6; }
20450      else
20451        # Check if the provided tool contains a complete path.
20452        tool_specified="$UNZIP"
20453        tool_basename="${tool_specified##*/}"
20454        if test "x$tool_basename" = "x$tool_specified"; then
20455          # A command without a complete path is provided, search $PATH.
20456          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20457$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20458          # Extract the first word of "$tool_basename", so it can be a program name with args.
20459set dummy $tool_basename; ac_word=$2
20460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20461$as_echo_n "checking for $ac_word... " >&6; }
20462if ${ac_cv_path_UNZIP+:} false; then :
20463  $as_echo_n "(cached) " >&6
20464else
20465  case $UNZIP in
20466  [\\/]* | ?:[\\/]*)
20467  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20468  ;;
20469  *)
20470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20471for as_dir in $PATH
20472do
20473  IFS=$as_save_IFS
20474  test -z "$as_dir" && as_dir=.
20475    for ac_exec_ext in '' $ac_executable_extensions; do
20476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20477    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20479    break 2
20480  fi
20481done
20482  done
20483IFS=$as_save_IFS
20484
20485  ;;
20486esac
20487fi
20488UNZIP=$ac_cv_path_UNZIP
20489if test -n "$UNZIP"; then
20490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20491$as_echo "$UNZIP" >&6; }
20492else
20493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20494$as_echo "no" >&6; }
20495fi
20496
20497
20498          if test "x$UNZIP" = x; then
20499            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20500          fi
20501        else
20502          # Otherwise we believe it is a complete path. Use it as it is.
20503          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20504$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20505          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20506$as_echo_n "checking for UNZIP... " >&6; }
20507          if test ! -x "$tool_specified"; then
20508            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20509$as_echo "not found" >&6; }
20510            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20511          fi
20512          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20513$as_echo "$tool_specified" >&6; }
20514        fi
20515      fi
20516    fi
20517
20518  fi
20519
20520
20521
20522  if test "x$UNZIP" = x; then
20523    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20524  fi
20525
20526
20527
20528
20529
20530  # Publish this variable in the help.
20531
20532
20533  if [ -z "${ZIP+x}" ]; then
20534    # The variable is not set by user, try to locate tool using the code snippet
20535    for ac_prog in zip
20536do
20537  # Extract the first word of "$ac_prog", so it can be a program name with args.
20538set dummy $ac_prog; ac_word=$2
20539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20540$as_echo_n "checking for $ac_word... " >&6; }
20541if ${ac_cv_path_ZIP+:} false; then :
20542  $as_echo_n "(cached) " >&6
20543else
20544  case $ZIP in
20545  [\\/]* | ?:[\\/]*)
20546  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20547  ;;
20548  *)
20549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20550for as_dir in $PATH
20551do
20552  IFS=$as_save_IFS
20553  test -z "$as_dir" && as_dir=.
20554    for ac_exec_ext in '' $ac_executable_extensions; do
20555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20556    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20558    break 2
20559  fi
20560done
20561  done
20562IFS=$as_save_IFS
20563
20564  ;;
20565esac
20566fi
20567ZIP=$ac_cv_path_ZIP
20568if test -n "$ZIP"; then
20569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20570$as_echo "$ZIP" >&6; }
20571else
20572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20573$as_echo "no" >&6; }
20574fi
20575
20576
20577  test -n "$ZIP" && break
20578done
20579
20580  else
20581    # The variable is set, but is it from the command line or the environment?
20582
20583    # Try to remove the string !ZIP! from our list.
20584    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20585    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20586      # If it failed, the variable was not from the command line. Ignore it,
20587      # but warn the user (except for BASH, which is always set by the calling BASH).
20588      if test "xZIP" != xBASH; then
20589        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20590$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20591      fi
20592      # Try to locate tool using the code snippet
20593      for ac_prog in zip
20594do
20595  # Extract the first word of "$ac_prog", so it can be a program name with args.
20596set dummy $ac_prog; ac_word=$2
20597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20598$as_echo_n "checking for $ac_word... " >&6; }
20599if ${ac_cv_path_ZIP+:} false; then :
20600  $as_echo_n "(cached) " >&6
20601else
20602  case $ZIP in
20603  [\\/]* | ?:[\\/]*)
20604  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20605  ;;
20606  *)
20607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20608for as_dir in $PATH
20609do
20610  IFS=$as_save_IFS
20611  test -z "$as_dir" && as_dir=.
20612    for ac_exec_ext in '' $ac_executable_extensions; do
20613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20614    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20616    break 2
20617  fi
20618done
20619  done
20620IFS=$as_save_IFS
20621
20622  ;;
20623esac
20624fi
20625ZIP=$ac_cv_path_ZIP
20626if test -n "$ZIP"; then
20627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20628$as_echo "$ZIP" >&6; }
20629else
20630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20631$as_echo "no" >&6; }
20632fi
20633
20634
20635  test -n "$ZIP" && break
20636done
20637
20638    else
20639      # If it succeeded, then it was overridden by the user. We will use it
20640      # for the tool.
20641
20642      # First remove it from the list of overridden variables, so we can test
20643      # for unknown variables in the end.
20644      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20645
20646      # Check if we try to supply an empty value
20647      if test "x$ZIP" = x; then
20648        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20649$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20650        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20651$as_echo_n "checking for ZIP... " >&6; }
20652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20653$as_echo "disabled" >&6; }
20654      else
20655        # Check if the provided tool contains a complete path.
20656        tool_specified="$ZIP"
20657        tool_basename="${tool_specified##*/}"
20658        if test "x$tool_basename" = "x$tool_specified"; then
20659          # A command without a complete path is provided, search $PATH.
20660          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20661$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20662          # Extract the first word of "$tool_basename", so it can be a program name with args.
20663set dummy $tool_basename; ac_word=$2
20664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20665$as_echo_n "checking for $ac_word... " >&6; }
20666if ${ac_cv_path_ZIP+:} false; then :
20667  $as_echo_n "(cached) " >&6
20668else
20669  case $ZIP in
20670  [\\/]* | ?:[\\/]*)
20671  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20672  ;;
20673  *)
20674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20675for as_dir in $PATH
20676do
20677  IFS=$as_save_IFS
20678  test -z "$as_dir" && as_dir=.
20679    for ac_exec_ext in '' $ac_executable_extensions; do
20680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20681    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20683    break 2
20684  fi
20685done
20686  done
20687IFS=$as_save_IFS
20688
20689  ;;
20690esac
20691fi
20692ZIP=$ac_cv_path_ZIP
20693if test -n "$ZIP"; then
20694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20695$as_echo "$ZIP" >&6; }
20696else
20697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20698$as_echo "no" >&6; }
20699fi
20700
20701
20702          if test "x$ZIP" = x; then
20703            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20704          fi
20705        else
20706          # Otherwise we believe it is a complete path. Use it as it is.
20707          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20708$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20709          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20710$as_echo_n "checking for ZIP... " >&6; }
20711          if test ! -x "$tool_specified"; then
20712            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20713$as_echo "not found" >&6; }
20714            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20715          fi
20716          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20717$as_echo "$tool_specified" >&6; }
20718        fi
20719      fi
20720    fi
20721
20722  fi
20723
20724
20725
20726  if test "x$ZIP" = x; then
20727    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20728  fi
20729
20730
20731
20732  # Non-required basic tools
20733
20734
20735
20736  # Publish this variable in the help.
20737
20738
20739  if [ -z "${LDD+x}" ]; then
20740    # The variable is not set by user, try to locate tool using the code snippet
20741    for ac_prog in ldd
20742do
20743  # Extract the first word of "$ac_prog", so it can be a program name with args.
20744set dummy $ac_prog; ac_word=$2
20745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20746$as_echo_n "checking for $ac_word... " >&6; }
20747if ${ac_cv_path_LDD+:} false; then :
20748  $as_echo_n "(cached) " >&6
20749else
20750  case $LDD in
20751  [\\/]* | ?:[\\/]*)
20752  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20753  ;;
20754  *)
20755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20756for as_dir in $PATH
20757do
20758  IFS=$as_save_IFS
20759  test -z "$as_dir" && as_dir=.
20760    for ac_exec_ext in '' $ac_executable_extensions; do
20761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20762    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20764    break 2
20765  fi
20766done
20767  done
20768IFS=$as_save_IFS
20769
20770  ;;
20771esac
20772fi
20773LDD=$ac_cv_path_LDD
20774if test -n "$LDD"; then
20775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20776$as_echo "$LDD" >&6; }
20777else
20778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20779$as_echo "no" >&6; }
20780fi
20781
20782
20783  test -n "$LDD" && break
20784done
20785
20786  else
20787    # The variable is set, but is it from the command line or the environment?
20788
20789    # Try to remove the string !LDD! from our list.
20790    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20791    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20792      # If it failed, the variable was not from the command line. Ignore it,
20793      # but warn the user (except for BASH, which is always set by the calling BASH).
20794      if test "xLDD" != xBASH; then
20795        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20796$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20797      fi
20798      # Try to locate tool using the code snippet
20799      for ac_prog in ldd
20800do
20801  # Extract the first word of "$ac_prog", so it can be a program name with args.
20802set dummy $ac_prog; ac_word=$2
20803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20804$as_echo_n "checking for $ac_word... " >&6; }
20805if ${ac_cv_path_LDD+:} false; then :
20806  $as_echo_n "(cached) " >&6
20807else
20808  case $LDD in
20809  [\\/]* | ?:[\\/]*)
20810  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20811  ;;
20812  *)
20813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20814for as_dir in $PATH
20815do
20816  IFS=$as_save_IFS
20817  test -z "$as_dir" && as_dir=.
20818    for ac_exec_ext in '' $ac_executable_extensions; do
20819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20820    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20822    break 2
20823  fi
20824done
20825  done
20826IFS=$as_save_IFS
20827
20828  ;;
20829esac
20830fi
20831LDD=$ac_cv_path_LDD
20832if test -n "$LDD"; then
20833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20834$as_echo "$LDD" >&6; }
20835else
20836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20837$as_echo "no" >&6; }
20838fi
20839
20840
20841  test -n "$LDD" && break
20842done
20843
20844    else
20845      # If it succeeded, then it was overridden by the user. We will use it
20846      # for the tool.
20847
20848      # First remove it from the list of overridden variables, so we can test
20849      # for unknown variables in the end.
20850      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20851
20852      # Check if we try to supply an empty value
20853      if test "x$LDD" = x; then
20854        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20855$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20856        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20857$as_echo_n "checking for LDD... " >&6; }
20858        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20859$as_echo "disabled" >&6; }
20860      else
20861        # Check if the provided tool contains a complete path.
20862        tool_specified="$LDD"
20863        tool_basename="${tool_specified##*/}"
20864        if test "x$tool_basename" = "x$tool_specified"; then
20865          # A command without a complete path is provided, search $PATH.
20866          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20867$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20868          # Extract the first word of "$tool_basename", so it can be a program name with args.
20869set dummy $tool_basename; ac_word=$2
20870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20871$as_echo_n "checking for $ac_word... " >&6; }
20872if ${ac_cv_path_LDD+:} false; then :
20873  $as_echo_n "(cached) " >&6
20874else
20875  case $LDD in
20876  [\\/]* | ?:[\\/]*)
20877  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20878  ;;
20879  *)
20880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20881for as_dir in $PATH
20882do
20883  IFS=$as_save_IFS
20884  test -z "$as_dir" && as_dir=.
20885    for ac_exec_ext in '' $ac_executable_extensions; do
20886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20887    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20889    break 2
20890  fi
20891done
20892  done
20893IFS=$as_save_IFS
20894
20895  ;;
20896esac
20897fi
20898LDD=$ac_cv_path_LDD
20899if test -n "$LDD"; then
20900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20901$as_echo "$LDD" >&6; }
20902else
20903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20904$as_echo "no" >&6; }
20905fi
20906
20907
20908          if test "x$LDD" = x; then
20909            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20910          fi
20911        else
20912          # Otherwise we believe it is a complete path. Use it as it is.
20913          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20914$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20915          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20916$as_echo_n "checking for LDD... " >&6; }
20917          if test ! -x "$tool_specified"; then
20918            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20919$as_echo "not found" >&6; }
20920            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20921          fi
20922          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20923$as_echo "$tool_specified" >&6; }
20924        fi
20925      fi
20926    fi
20927
20928  fi
20929
20930
20931  if test "x$LDD" = "x"; then
20932    # List shared lib dependencies is used for
20933    # debug output and checking for forbidden dependencies.
20934    # We can build without it.
20935    LDD="true"
20936  fi
20937
20938
20939  # Publish this variable in the help.
20940
20941
20942  if [ -z "${OTOOL+x}" ]; then
20943    # The variable is not set by user, try to locate tool using the code snippet
20944    for ac_prog in otool
20945do
20946  # Extract the first word of "$ac_prog", so it can be a program name with args.
20947set dummy $ac_prog; ac_word=$2
20948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20949$as_echo_n "checking for $ac_word... " >&6; }
20950if ${ac_cv_path_OTOOL+:} false; then :
20951  $as_echo_n "(cached) " >&6
20952else
20953  case $OTOOL in
20954  [\\/]* | ?:[\\/]*)
20955  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20956  ;;
20957  *)
20958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20959for as_dir in $PATH
20960do
20961  IFS=$as_save_IFS
20962  test -z "$as_dir" && as_dir=.
20963    for ac_exec_ext in '' $ac_executable_extensions; do
20964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20965    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20967    break 2
20968  fi
20969done
20970  done
20971IFS=$as_save_IFS
20972
20973  ;;
20974esac
20975fi
20976OTOOL=$ac_cv_path_OTOOL
20977if test -n "$OTOOL"; then
20978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20979$as_echo "$OTOOL" >&6; }
20980else
20981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20982$as_echo "no" >&6; }
20983fi
20984
20985
20986  test -n "$OTOOL" && break
20987done
20988
20989  else
20990    # The variable is set, but is it from the command line or the environment?
20991
20992    # Try to remove the string !OTOOL! from our list.
20993    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
20994    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20995      # If it failed, the variable was not from the command line. Ignore it,
20996      # but warn the user (except for BASH, which is always set by the calling BASH).
20997      if test "xOTOOL" != xBASH; then
20998        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
20999$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21000      fi
21001      # Try to locate tool using the code snippet
21002      for ac_prog in otool
21003do
21004  # Extract the first word of "$ac_prog", so it can be a program name with args.
21005set dummy $ac_prog; ac_word=$2
21006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21007$as_echo_n "checking for $ac_word... " >&6; }
21008if ${ac_cv_path_OTOOL+:} false; then :
21009  $as_echo_n "(cached) " >&6
21010else
21011  case $OTOOL in
21012  [\\/]* | ?:[\\/]*)
21013  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21014  ;;
21015  *)
21016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21017for as_dir in $PATH
21018do
21019  IFS=$as_save_IFS
21020  test -z "$as_dir" && as_dir=.
21021    for ac_exec_ext in '' $ac_executable_extensions; do
21022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21023    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21025    break 2
21026  fi
21027done
21028  done
21029IFS=$as_save_IFS
21030
21031  ;;
21032esac
21033fi
21034OTOOL=$ac_cv_path_OTOOL
21035if test -n "$OTOOL"; then
21036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21037$as_echo "$OTOOL" >&6; }
21038else
21039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21040$as_echo "no" >&6; }
21041fi
21042
21043
21044  test -n "$OTOOL" && break
21045done
21046
21047    else
21048      # If it succeeded, then it was overridden by the user. We will use it
21049      # for the tool.
21050
21051      # First remove it from the list of overridden variables, so we can test
21052      # for unknown variables in the end.
21053      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21054
21055      # Check if we try to supply an empty value
21056      if test "x$OTOOL" = x; then
21057        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21058$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21059        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21060$as_echo_n "checking for OTOOL... " >&6; }
21061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21062$as_echo "disabled" >&6; }
21063      else
21064        # Check if the provided tool contains a complete path.
21065        tool_specified="$OTOOL"
21066        tool_basename="${tool_specified##*/}"
21067        if test "x$tool_basename" = "x$tool_specified"; then
21068          # A command without a complete path is provided, search $PATH.
21069          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21070$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21071          # Extract the first word of "$tool_basename", so it can be a program name with args.
21072set dummy $tool_basename; ac_word=$2
21073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21074$as_echo_n "checking for $ac_word... " >&6; }
21075if ${ac_cv_path_OTOOL+:} false; then :
21076  $as_echo_n "(cached) " >&6
21077else
21078  case $OTOOL in
21079  [\\/]* | ?:[\\/]*)
21080  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21081  ;;
21082  *)
21083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21084for as_dir in $PATH
21085do
21086  IFS=$as_save_IFS
21087  test -z "$as_dir" && as_dir=.
21088    for ac_exec_ext in '' $ac_executable_extensions; do
21089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21090    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21092    break 2
21093  fi
21094done
21095  done
21096IFS=$as_save_IFS
21097
21098  ;;
21099esac
21100fi
21101OTOOL=$ac_cv_path_OTOOL
21102if test -n "$OTOOL"; then
21103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21104$as_echo "$OTOOL" >&6; }
21105else
21106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21107$as_echo "no" >&6; }
21108fi
21109
21110
21111          if test "x$OTOOL" = x; then
21112            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21113          fi
21114        else
21115          # Otherwise we believe it is a complete path. Use it as it is.
21116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21117$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21118          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21119$as_echo_n "checking for OTOOL... " >&6; }
21120          if test ! -x "$tool_specified"; then
21121            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21122$as_echo "not found" >&6; }
21123            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21124          fi
21125          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21126$as_echo "$tool_specified" >&6; }
21127        fi
21128      fi
21129    fi
21130
21131  fi
21132
21133
21134  if test "x$OTOOL" = "x"; then
21135    OTOOL="true"
21136  fi
21137
21138
21139  # Publish this variable in the help.
21140
21141
21142  if [ -z "${READELF+x}" ]; then
21143    # The variable is not set by user, try to locate tool using the code snippet
21144    for ac_prog in greadelf readelf
21145do
21146  # Extract the first word of "$ac_prog", so it can be a program name with args.
21147set dummy $ac_prog; ac_word=$2
21148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21149$as_echo_n "checking for $ac_word... " >&6; }
21150if ${ac_cv_path_READELF+:} false; then :
21151  $as_echo_n "(cached) " >&6
21152else
21153  case $READELF in
21154  [\\/]* | ?:[\\/]*)
21155  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21156  ;;
21157  *)
21158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21159for as_dir in $PATH
21160do
21161  IFS=$as_save_IFS
21162  test -z "$as_dir" && as_dir=.
21163    for ac_exec_ext in '' $ac_executable_extensions; do
21164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21165    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21167    break 2
21168  fi
21169done
21170  done
21171IFS=$as_save_IFS
21172
21173  ;;
21174esac
21175fi
21176READELF=$ac_cv_path_READELF
21177if test -n "$READELF"; then
21178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21179$as_echo "$READELF" >&6; }
21180else
21181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21182$as_echo "no" >&6; }
21183fi
21184
21185
21186  test -n "$READELF" && break
21187done
21188
21189  else
21190    # The variable is set, but is it from the command line or the environment?
21191
21192    # Try to remove the string !READELF! from our list.
21193    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21194    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21195      # If it failed, the variable was not from the command line. Ignore it,
21196      # but warn the user (except for BASH, which is always set by the calling BASH).
21197      if test "xREADELF" != xBASH; then
21198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21199$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21200      fi
21201      # Try to locate tool using the code snippet
21202      for ac_prog in greadelf readelf
21203do
21204  # Extract the first word of "$ac_prog", so it can be a program name with args.
21205set dummy $ac_prog; ac_word=$2
21206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21207$as_echo_n "checking for $ac_word... " >&6; }
21208if ${ac_cv_path_READELF+:} false; then :
21209  $as_echo_n "(cached) " >&6
21210else
21211  case $READELF in
21212  [\\/]* | ?:[\\/]*)
21213  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21214  ;;
21215  *)
21216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21217for as_dir in $PATH
21218do
21219  IFS=$as_save_IFS
21220  test -z "$as_dir" && as_dir=.
21221    for ac_exec_ext in '' $ac_executable_extensions; do
21222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21223    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21225    break 2
21226  fi
21227done
21228  done
21229IFS=$as_save_IFS
21230
21231  ;;
21232esac
21233fi
21234READELF=$ac_cv_path_READELF
21235if test -n "$READELF"; then
21236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21237$as_echo "$READELF" >&6; }
21238else
21239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21240$as_echo "no" >&6; }
21241fi
21242
21243
21244  test -n "$READELF" && break
21245done
21246
21247    else
21248      # If it succeeded, then it was overridden by the user. We will use it
21249      # for the tool.
21250
21251      # First remove it from the list of overridden variables, so we can test
21252      # for unknown variables in the end.
21253      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21254
21255      # Check if we try to supply an empty value
21256      if test "x$READELF" = x; then
21257        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21258$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21259        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21260$as_echo_n "checking for READELF... " >&6; }
21261        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21262$as_echo "disabled" >&6; }
21263      else
21264        # Check if the provided tool contains a complete path.
21265        tool_specified="$READELF"
21266        tool_basename="${tool_specified##*/}"
21267        if test "x$tool_basename" = "x$tool_specified"; then
21268          # A command without a complete path is provided, search $PATH.
21269          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21270$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21271          # Extract the first word of "$tool_basename", so it can be a program name with args.
21272set dummy $tool_basename; ac_word=$2
21273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21274$as_echo_n "checking for $ac_word... " >&6; }
21275if ${ac_cv_path_READELF+:} false; then :
21276  $as_echo_n "(cached) " >&6
21277else
21278  case $READELF in
21279  [\\/]* | ?:[\\/]*)
21280  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21281  ;;
21282  *)
21283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21284for as_dir in $PATH
21285do
21286  IFS=$as_save_IFS
21287  test -z "$as_dir" && as_dir=.
21288    for ac_exec_ext in '' $ac_executable_extensions; do
21289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21290    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21292    break 2
21293  fi
21294done
21295  done
21296IFS=$as_save_IFS
21297
21298  ;;
21299esac
21300fi
21301READELF=$ac_cv_path_READELF
21302if test -n "$READELF"; then
21303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21304$as_echo "$READELF" >&6; }
21305else
21306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21307$as_echo "no" >&6; }
21308fi
21309
21310
21311          if test "x$READELF" = x; then
21312            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21313          fi
21314        else
21315          # Otherwise we believe it is a complete path. Use it as it is.
21316          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21317$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21318          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21319$as_echo_n "checking for READELF... " >&6; }
21320          if test ! -x "$tool_specified"; then
21321            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21322$as_echo "not found" >&6; }
21323            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21324          fi
21325          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21326$as_echo "$tool_specified" >&6; }
21327        fi
21328      fi
21329    fi
21330
21331  fi
21332
21333
21334
21335
21336  # Publish this variable in the help.
21337
21338
21339  if [ -z "${HG+x}" ]; then
21340    # The variable is not set by user, try to locate tool using the code snippet
21341    for ac_prog in hg
21342do
21343  # Extract the first word of "$ac_prog", so it can be a program name with args.
21344set dummy $ac_prog; ac_word=$2
21345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21346$as_echo_n "checking for $ac_word... " >&6; }
21347if ${ac_cv_path_HG+:} false; then :
21348  $as_echo_n "(cached) " >&6
21349else
21350  case $HG in
21351  [\\/]* | ?:[\\/]*)
21352  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21353  ;;
21354  *)
21355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21356for as_dir in $PATH
21357do
21358  IFS=$as_save_IFS
21359  test -z "$as_dir" && as_dir=.
21360    for ac_exec_ext in '' $ac_executable_extensions; do
21361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21362    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21364    break 2
21365  fi
21366done
21367  done
21368IFS=$as_save_IFS
21369
21370  ;;
21371esac
21372fi
21373HG=$ac_cv_path_HG
21374if test -n "$HG"; then
21375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21376$as_echo "$HG" >&6; }
21377else
21378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21379$as_echo "no" >&6; }
21380fi
21381
21382
21383  test -n "$HG" && break
21384done
21385
21386  else
21387    # The variable is set, but is it from the command line or the environment?
21388
21389    # Try to remove the string !HG! from our list.
21390    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21391    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21392      # If it failed, the variable was not from the command line. Ignore it,
21393      # but warn the user (except for BASH, which is always set by the calling BASH).
21394      if test "xHG" != xBASH; then
21395        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21396$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21397      fi
21398      # Try to locate tool using the code snippet
21399      for ac_prog in hg
21400do
21401  # Extract the first word of "$ac_prog", so it can be a program name with args.
21402set dummy $ac_prog; ac_word=$2
21403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21404$as_echo_n "checking for $ac_word... " >&6; }
21405if ${ac_cv_path_HG+:} false; then :
21406  $as_echo_n "(cached) " >&6
21407else
21408  case $HG in
21409  [\\/]* | ?:[\\/]*)
21410  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21411  ;;
21412  *)
21413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21414for as_dir in $PATH
21415do
21416  IFS=$as_save_IFS
21417  test -z "$as_dir" && as_dir=.
21418    for ac_exec_ext in '' $ac_executable_extensions; do
21419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21420    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21422    break 2
21423  fi
21424done
21425  done
21426IFS=$as_save_IFS
21427
21428  ;;
21429esac
21430fi
21431HG=$ac_cv_path_HG
21432if test -n "$HG"; then
21433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21434$as_echo "$HG" >&6; }
21435else
21436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21437$as_echo "no" >&6; }
21438fi
21439
21440
21441  test -n "$HG" && break
21442done
21443
21444    else
21445      # If it succeeded, then it was overridden by the user. We will use it
21446      # for the tool.
21447
21448      # First remove it from the list of overridden variables, so we can test
21449      # for unknown variables in the end.
21450      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21451
21452      # Check if we try to supply an empty value
21453      if test "x$HG" = x; then
21454        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21455$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21456        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21457$as_echo_n "checking for HG... " >&6; }
21458        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21459$as_echo "disabled" >&6; }
21460      else
21461        # Check if the provided tool contains a complete path.
21462        tool_specified="$HG"
21463        tool_basename="${tool_specified##*/}"
21464        if test "x$tool_basename" = "x$tool_specified"; then
21465          # A command without a complete path is provided, search $PATH.
21466          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21467$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21468          # Extract the first word of "$tool_basename", so it can be a program name with args.
21469set dummy $tool_basename; ac_word=$2
21470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21471$as_echo_n "checking for $ac_word... " >&6; }
21472if ${ac_cv_path_HG+:} false; then :
21473  $as_echo_n "(cached) " >&6
21474else
21475  case $HG in
21476  [\\/]* | ?:[\\/]*)
21477  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21478  ;;
21479  *)
21480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21481for as_dir in $PATH
21482do
21483  IFS=$as_save_IFS
21484  test -z "$as_dir" && as_dir=.
21485    for ac_exec_ext in '' $ac_executable_extensions; do
21486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21487    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21489    break 2
21490  fi
21491done
21492  done
21493IFS=$as_save_IFS
21494
21495  ;;
21496esac
21497fi
21498HG=$ac_cv_path_HG
21499if test -n "$HG"; then
21500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21501$as_echo "$HG" >&6; }
21502else
21503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21504$as_echo "no" >&6; }
21505fi
21506
21507
21508          if test "x$HG" = x; then
21509            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21510          fi
21511        else
21512          # Otherwise we believe it is a complete path. Use it as it is.
21513          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21514$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21515          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21516$as_echo_n "checking for HG... " >&6; }
21517          if test ! -x "$tool_specified"; then
21518            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21519$as_echo "not found" >&6; }
21520            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21521          fi
21522          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21523$as_echo "$tool_specified" >&6; }
21524        fi
21525      fi
21526    fi
21527
21528  fi
21529
21530
21531
21532
21533  # Publish this variable in the help.
21534
21535
21536  if [ -z "${STAT+x}" ]; then
21537    # The variable is not set by user, try to locate tool using the code snippet
21538    for ac_prog in stat
21539do
21540  # Extract the first word of "$ac_prog", so it can be a program name with args.
21541set dummy $ac_prog; ac_word=$2
21542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21543$as_echo_n "checking for $ac_word... " >&6; }
21544if ${ac_cv_path_STAT+:} false; then :
21545  $as_echo_n "(cached) " >&6
21546else
21547  case $STAT in
21548  [\\/]* | ?:[\\/]*)
21549  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21550  ;;
21551  *)
21552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21553for as_dir in $PATH
21554do
21555  IFS=$as_save_IFS
21556  test -z "$as_dir" && as_dir=.
21557    for ac_exec_ext in '' $ac_executable_extensions; do
21558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21559    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21561    break 2
21562  fi
21563done
21564  done
21565IFS=$as_save_IFS
21566
21567  ;;
21568esac
21569fi
21570STAT=$ac_cv_path_STAT
21571if test -n "$STAT"; then
21572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21573$as_echo "$STAT" >&6; }
21574else
21575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21576$as_echo "no" >&6; }
21577fi
21578
21579
21580  test -n "$STAT" && break
21581done
21582
21583  else
21584    # The variable is set, but is it from the command line or the environment?
21585
21586    # Try to remove the string !STAT! from our list.
21587    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21588    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21589      # If it failed, the variable was not from the command line. Ignore it,
21590      # but warn the user (except for BASH, which is always set by the calling BASH).
21591      if test "xSTAT" != xBASH; then
21592        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21593$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21594      fi
21595      # Try to locate tool using the code snippet
21596      for ac_prog in stat
21597do
21598  # Extract the first word of "$ac_prog", so it can be a program name with args.
21599set dummy $ac_prog; ac_word=$2
21600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21601$as_echo_n "checking for $ac_word... " >&6; }
21602if ${ac_cv_path_STAT+:} false; then :
21603  $as_echo_n "(cached) " >&6
21604else
21605  case $STAT in
21606  [\\/]* | ?:[\\/]*)
21607  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21608  ;;
21609  *)
21610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21611for as_dir in $PATH
21612do
21613  IFS=$as_save_IFS
21614  test -z "$as_dir" && as_dir=.
21615    for ac_exec_ext in '' $ac_executable_extensions; do
21616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21617    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21619    break 2
21620  fi
21621done
21622  done
21623IFS=$as_save_IFS
21624
21625  ;;
21626esac
21627fi
21628STAT=$ac_cv_path_STAT
21629if test -n "$STAT"; then
21630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21631$as_echo "$STAT" >&6; }
21632else
21633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21634$as_echo "no" >&6; }
21635fi
21636
21637
21638  test -n "$STAT" && break
21639done
21640
21641    else
21642      # If it succeeded, then it was overridden by the user. We will use it
21643      # for the tool.
21644
21645      # First remove it from the list of overridden variables, so we can test
21646      # for unknown variables in the end.
21647      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21648
21649      # Check if we try to supply an empty value
21650      if test "x$STAT" = x; then
21651        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21652$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21653        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21654$as_echo_n "checking for STAT... " >&6; }
21655        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21656$as_echo "disabled" >&6; }
21657      else
21658        # Check if the provided tool contains a complete path.
21659        tool_specified="$STAT"
21660        tool_basename="${tool_specified##*/}"
21661        if test "x$tool_basename" = "x$tool_specified"; then
21662          # A command without a complete path is provided, search $PATH.
21663          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21664$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21665          # Extract the first word of "$tool_basename", so it can be a program name with args.
21666set dummy $tool_basename; ac_word=$2
21667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21668$as_echo_n "checking for $ac_word... " >&6; }
21669if ${ac_cv_path_STAT+:} false; then :
21670  $as_echo_n "(cached) " >&6
21671else
21672  case $STAT in
21673  [\\/]* | ?:[\\/]*)
21674  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21675  ;;
21676  *)
21677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21678for as_dir in $PATH
21679do
21680  IFS=$as_save_IFS
21681  test -z "$as_dir" && as_dir=.
21682    for ac_exec_ext in '' $ac_executable_extensions; do
21683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21684    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21686    break 2
21687  fi
21688done
21689  done
21690IFS=$as_save_IFS
21691
21692  ;;
21693esac
21694fi
21695STAT=$ac_cv_path_STAT
21696if test -n "$STAT"; then
21697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21698$as_echo "$STAT" >&6; }
21699else
21700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21701$as_echo "no" >&6; }
21702fi
21703
21704
21705          if test "x$STAT" = x; then
21706            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21707          fi
21708        else
21709          # Otherwise we believe it is a complete path. Use it as it is.
21710          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21711$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21712          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21713$as_echo_n "checking for STAT... " >&6; }
21714          if test ! -x "$tool_specified"; then
21715            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21716$as_echo "not found" >&6; }
21717            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21718          fi
21719          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21720$as_echo "$tool_specified" >&6; }
21721        fi
21722      fi
21723    fi
21724
21725  fi
21726
21727
21728
21729
21730  # Publish this variable in the help.
21731
21732
21733  if [ -z "${TIME+x}" ]; then
21734    # The variable is not set by user, try to locate tool using the code snippet
21735    for ac_prog in time
21736do
21737  # Extract the first word of "$ac_prog", so it can be a program name with args.
21738set dummy $ac_prog; ac_word=$2
21739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21740$as_echo_n "checking for $ac_word... " >&6; }
21741if ${ac_cv_path_TIME+:} false; then :
21742  $as_echo_n "(cached) " >&6
21743else
21744  case $TIME in
21745  [\\/]* | ?:[\\/]*)
21746  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21747  ;;
21748  *)
21749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21750for as_dir in $PATH
21751do
21752  IFS=$as_save_IFS
21753  test -z "$as_dir" && as_dir=.
21754    for ac_exec_ext in '' $ac_executable_extensions; do
21755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21756    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21758    break 2
21759  fi
21760done
21761  done
21762IFS=$as_save_IFS
21763
21764  ;;
21765esac
21766fi
21767TIME=$ac_cv_path_TIME
21768if test -n "$TIME"; then
21769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21770$as_echo "$TIME" >&6; }
21771else
21772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21773$as_echo "no" >&6; }
21774fi
21775
21776
21777  test -n "$TIME" && break
21778done
21779
21780  else
21781    # The variable is set, but is it from the command line or the environment?
21782
21783    # Try to remove the string !TIME! from our list.
21784    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21785    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21786      # If it failed, the variable was not from the command line. Ignore it,
21787      # but warn the user (except for BASH, which is always set by the calling BASH).
21788      if test "xTIME" != xBASH; then
21789        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21790$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21791      fi
21792      # Try to locate tool using the code snippet
21793      for ac_prog in time
21794do
21795  # Extract the first word of "$ac_prog", so it can be a program name with args.
21796set dummy $ac_prog; ac_word=$2
21797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21798$as_echo_n "checking for $ac_word... " >&6; }
21799if ${ac_cv_path_TIME+:} false; then :
21800  $as_echo_n "(cached) " >&6
21801else
21802  case $TIME in
21803  [\\/]* | ?:[\\/]*)
21804  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21805  ;;
21806  *)
21807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21808for as_dir in $PATH
21809do
21810  IFS=$as_save_IFS
21811  test -z "$as_dir" && as_dir=.
21812    for ac_exec_ext in '' $ac_executable_extensions; do
21813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21814    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21816    break 2
21817  fi
21818done
21819  done
21820IFS=$as_save_IFS
21821
21822  ;;
21823esac
21824fi
21825TIME=$ac_cv_path_TIME
21826if test -n "$TIME"; then
21827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21828$as_echo "$TIME" >&6; }
21829else
21830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21831$as_echo "no" >&6; }
21832fi
21833
21834
21835  test -n "$TIME" && break
21836done
21837
21838    else
21839      # If it succeeded, then it was overridden by the user. We will use it
21840      # for the tool.
21841
21842      # First remove it from the list of overridden variables, so we can test
21843      # for unknown variables in the end.
21844      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21845
21846      # Check if we try to supply an empty value
21847      if test "x$TIME" = x; then
21848        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21849$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21850        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21851$as_echo_n "checking for TIME... " >&6; }
21852        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21853$as_echo "disabled" >&6; }
21854      else
21855        # Check if the provided tool contains a complete path.
21856        tool_specified="$TIME"
21857        tool_basename="${tool_specified##*/}"
21858        if test "x$tool_basename" = "x$tool_specified"; then
21859          # A command without a complete path is provided, search $PATH.
21860          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21861$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21862          # Extract the first word of "$tool_basename", so it can be a program name with args.
21863set dummy $tool_basename; ac_word=$2
21864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21865$as_echo_n "checking for $ac_word... " >&6; }
21866if ${ac_cv_path_TIME+:} false; then :
21867  $as_echo_n "(cached) " >&6
21868else
21869  case $TIME in
21870  [\\/]* | ?:[\\/]*)
21871  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21872  ;;
21873  *)
21874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21875for as_dir in $PATH
21876do
21877  IFS=$as_save_IFS
21878  test -z "$as_dir" && as_dir=.
21879    for ac_exec_ext in '' $ac_executable_extensions; do
21880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21881    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21883    break 2
21884  fi
21885done
21886  done
21887IFS=$as_save_IFS
21888
21889  ;;
21890esac
21891fi
21892TIME=$ac_cv_path_TIME
21893if test -n "$TIME"; then
21894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21895$as_echo "$TIME" >&6; }
21896else
21897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21898$as_echo "no" >&6; }
21899fi
21900
21901
21902          if test "x$TIME" = x; then
21903            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21904          fi
21905        else
21906          # Otherwise we believe it is a complete path. Use it as it is.
21907          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21908$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21909          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21910$as_echo_n "checking for TIME... " >&6; }
21911          if test ! -x "$tool_specified"; then
21912            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21913$as_echo "not found" >&6; }
21914            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21915          fi
21916          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21917$as_echo "$tool_specified" >&6; }
21918        fi
21919      fi
21920    fi
21921
21922  fi
21923
21924
21925
21926
21927  # Publish this variable in the help.
21928
21929
21930  if [ -z "${PATCH+x}" ]; then
21931    # The variable is not set by user, try to locate tool using the code snippet
21932    for ac_prog in gpatch patch
21933do
21934  # Extract the first word of "$ac_prog", so it can be a program name with args.
21935set dummy $ac_prog; ac_word=$2
21936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21937$as_echo_n "checking for $ac_word... " >&6; }
21938if ${ac_cv_path_PATCH+:} false; then :
21939  $as_echo_n "(cached) " >&6
21940else
21941  case $PATCH in
21942  [\\/]* | ?:[\\/]*)
21943  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21944  ;;
21945  *)
21946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21947for as_dir in $PATH
21948do
21949  IFS=$as_save_IFS
21950  test -z "$as_dir" && as_dir=.
21951    for ac_exec_ext in '' $ac_executable_extensions; do
21952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21953    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21955    break 2
21956  fi
21957done
21958  done
21959IFS=$as_save_IFS
21960
21961  ;;
21962esac
21963fi
21964PATCH=$ac_cv_path_PATCH
21965if test -n "$PATCH"; then
21966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21967$as_echo "$PATCH" >&6; }
21968else
21969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21970$as_echo "no" >&6; }
21971fi
21972
21973
21974  test -n "$PATCH" && break
21975done
21976
21977  else
21978    # The variable is set, but is it from the command line or the environment?
21979
21980    # Try to remove the string !PATCH! from our list.
21981    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
21982    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21983      # If it failed, the variable was not from the command line. Ignore it,
21984      # but warn the user (except for BASH, which is always set by the calling BASH).
21985      if test "xPATCH" != xBASH; then
21986        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
21987$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
21988      fi
21989      # Try to locate tool using the code snippet
21990      for ac_prog in gpatch patch
21991do
21992  # Extract the first word of "$ac_prog", so it can be a program name with args.
21993set dummy $ac_prog; ac_word=$2
21994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21995$as_echo_n "checking for $ac_word... " >&6; }
21996if ${ac_cv_path_PATCH+:} false; then :
21997  $as_echo_n "(cached) " >&6
21998else
21999  case $PATCH in
22000  [\\/]* | ?:[\\/]*)
22001  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22002  ;;
22003  *)
22004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22005for as_dir in $PATH
22006do
22007  IFS=$as_save_IFS
22008  test -z "$as_dir" && as_dir=.
22009    for ac_exec_ext in '' $ac_executable_extensions; do
22010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22011    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22013    break 2
22014  fi
22015done
22016  done
22017IFS=$as_save_IFS
22018
22019  ;;
22020esac
22021fi
22022PATCH=$ac_cv_path_PATCH
22023if test -n "$PATCH"; then
22024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22025$as_echo "$PATCH" >&6; }
22026else
22027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22028$as_echo "no" >&6; }
22029fi
22030
22031
22032  test -n "$PATCH" && break
22033done
22034
22035    else
22036      # If it succeeded, then it was overridden by the user. We will use it
22037      # for the tool.
22038
22039      # First remove it from the list of overridden variables, so we can test
22040      # for unknown variables in the end.
22041      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22042
22043      # Check if we try to supply an empty value
22044      if test "x$PATCH" = x; then
22045        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22046$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22047        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22048$as_echo_n "checking for PATCH... " >&6; }
22049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22050$as_echo "disabled" >&6; }
22051      else
22052        # Check if the provided tool contains a complete path.
22053        tool_specified="$PATCH"
22054        tool_basename="${tool_specified##*/}"
22055        if test "x$tool_basename" = "x$tool_specified"; then
22056          # A command without a complete path is provided, search $PATH.
22057          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22058$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22059          # Extract the first word of "$tool_basename", so it can be a program name with args.
22060set dummy $tool_basename; ac_word=$2
22061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22062$as_echo_n "checking for $ac_word... " >&6; }
22063if ${ac_cv_path_PATCH+:} false; then :
22064  $as_echo_n "(cached) " >&6
22065else
22066  case $PATCH in
22067  [\\/]* | ?:[\\/]*)
22068  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22069  ;;
22070  *)
22071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22072for as_dir in $PATH
22073do
22074  IFS=$as_save_IFS
22075  test -z "$as_dir" && as_dir=.
22076    for ac_exec_ext in '' $ac_executable_extensions; do
22077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22078    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22080    break 2
22081  fi
22082done
22083  done
22084IFS=$as_save_IFS
22085
22086  ;;
22087esac
22088fi
22089PATCH=$ac_cv_path_PATCH
22090if test -n "$PATCH"; then
22091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22092$as_echo "$PATCH" >&6; }
22093else
22094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22095$as_echo "no" >&6; }
22096fi
22097
22098
22099          if test "x$PATCH" = x; then
22100            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22101          fi
22102        else
22103          # Otherwise we believe it is a complete path. Use it as it is.
22104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22105$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22106          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22107$as_echo_n "checking for PATCH... " >&6; }
22108          if test ! -x "$tool_specified"; then
22109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22110$as_echo "not found" >&6; }
22111            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22112          fi
22113          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22114$as_echo "$tool_specified" >&6; }
22115        fi
22116      fi
22117    fi
22118
22119  fi
22120
22121
22122  # Check if it's GNU time
22123  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22124  if test "x$IS_GNU_TIME" != x; then
22125    IS_GNU_TIME=yes
22126  else
22127    IS_GNU_TIME=no
22128  fi
22129
22130
22131  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22132
22133
22134
22135  # Publish this variable in the help.
22136
22137
22138  if [ -z "${DSYMUTIL+x}" ]; then
22139    # The variable is not set by user, try to locate tool using the code snippet
22140    for ac_prog in dsymutil
22141do
22142  # Extract the first word of "$ac_prog", so it can be a program name with args.
22143set dummy $ac_prog; ac_word=$2
22144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22145$as_echo_n "checking for $ac_word... " >&6; }
22146if ${ac_cv_path_DSYMUTIL+:} false; then :
22147  $as_echo_n "(cached) " >&6
22148else
22149  case $DSYMUTIL in
22150  [\\/]* | ?:[\\/]*)
22151  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22152  ;;
22153  *)
22154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22155for as_dir in $PATH
22156do
22157  IFS=$as_save_IFS
22158  test -z "$as_dir" && as_dir=.
22159    for ac_exec_ext in '' $ac_executable_extensions; do
22160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22161    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22163    break 2
22164  fi
22165done
22166  done
22167IFS=$as_save_IFS
22168
22169  ;;
22170esac
22171fi
22172DSYMUTIL=$ac_cv_path_DSYMUTIL
22173if test -n "$DSYMUTIL"; then
22174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22175$as_echo "$DSYMUTIL" >&6; }
22176else
22177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22178$as_echo "no" >&6; }
22179fi
22180
22181
22182  test -n "$DSYMUTIL" && break
22183done
22184
22185  else
22186    # The variable is set, but is it from the command line or the environment?
22187
22188    # Try to remove the string !DSYMUTIL! from our list.
22189    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22190    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22191      # If it failed, the variable was not from the command line. Ignore it,
22192      # but warn the user (except for BASH, which is always set by the calling BASH).
22193      if test "xDSYMUTIL" != xBASH; then
22194        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22195$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22196      fi
22197      # Try to locate tool using the code snippet
22198      for ac_prog in dsymutil
22199do
22200  # Extract the first word of "$ac_prog", so it can be a program name with args.
22201set dummy $ac_prog; ac_word=$2
22202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22203$as_echo_n "checking for $ac_word... " >&6; }
22204if ${ac_cv_path_DSYMUTIL+:} false; then :
22205  $as_echo_n "(cached) " >&6
22206else
22207  case $DSYMUTIL in
22208  [\\/]* | ?:[\\/]*)
22209  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22210  ;;
22211  *)
22212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22213for as_dir in $PATH
22214do
22215  IFS=$as_save_IFS
22216  test -z "$as_dir" && as_dir=.
22217    for ac_exec_ext in '' $ac_executable_extensions; do
22218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22219    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22221    break 2
22222  fi
22223done
22224  done
22225IFS=$as_save_IFS
22226
22227  ;;
22228esac
22229fi
22230DSYMUTIL=$ac_cv_path_DSYMUTIL
22231if test -n "$DSYMUTIL"; then
22232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22233$as_echo "$DSYMUTIL" >&6; }
22234else
22235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22236$as_echo "no" >&6; }
22237fi
22238
22239
22240  test -n "$DSYMUTIL" && break
22241done
22242
22243    else
22244      # If it succeeded, then it was overridden by the user. We will use it
22245      # for the tool.
22246
22247      # First remove it from the list of overridden variables, so we can test
22248      # for unknown variables in the end.
22249      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22250
22251      # Check if we try to supply an empty value
22252      if test "x$DSYMUTIL" = x; then
22253        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22254$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22255        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22256$as_echo_n "checking for DSYMUTIL... " >&6; }
22257        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22258$as_echo "disabled" >&6; }
22259      else
22260        # Check if the provided tool contains a complete path.
22261        tool_specified="$DSYMUTIL"
22262        tool_basename="${tool_specified##*/}"
22263        if test "x$tool_basename" = "x$tool_specified"; then
22264          # A command without a complete path is provided, search $PATH.
22265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22266$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22267          # Extract the first word of "$tool_basename", so it can be a program name with args.
22268set dummy $tool_basename; ac_word=$2
22269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22270$as_echo_n "checking for $ac_word... " >&6; }
22271if ${ac_cv_path_DSYMUTIL+:} false; then :
22272  $as_echo_n "(cached) " >&6
22273else
22274  case $DSYMUTIL in
22275  [\\/]* | ?:[\\/]*)
22276  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22277  ;;
22278  *)
22279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22280for as_dir in $PATH
22281do
22282  IFS=$as_save_IFS
22283  test -z "$as_dir" && as_dir=.
22284    for ac_exec_ext in '' $ac_executable_extensions; do
22285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22286    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22288    break 2
22289  fi
22290done
22291  done
22292IFS=$as_save_IFS
22293
22294  ;;
22295esac
22296fi
22297DSYMUTIL=$ac_cv_path_DSYMUTIL
22298if test -n "$DSYMUTIL"; then
22299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22300$as_echo "$DSYMUTIL" >&6; }
22301else
22302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22303$as_echo "no" >&6; }
22304fi
22305
22306
22307          if test "x$DSYMUTIL" = x; then
22308            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22309          fi
22310        else
22311          # Otherwise we believe it is a complete path. Use it as it is.
22312          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22313$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22314          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22315$as_echo_n "checking for DSYMUTIL... " >&6; }
22316          if test ! -x "$tool_specified"; then
22317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22318$as_echo "not found" >&6; }
22319            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22320          fi
22321          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22322$as_echo "$tool_specified" >&6; }
22323        fi
22324      fi
22325    fi
22326
22327  fi
22328
22329
22330
22331  if test "x$DSYMUTIL" = x; then
22332    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22333  fi
22334
22335
22336
22337
22338
22339  # Publish this variable in the help.
22340
22341
22342  if [ -z "${XATTR+x}" ]; then
22343    # The variable is not set by user, try to locate tool using the code snippet
22344    for ac_prog in xattr
22345do
22346  # Extract the first word of "$ac_prog", so it can be a program name with args.
22347set dummy $ac_prog; ac_word=$2
22348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22349$as_echo_n "checking for $ac_word... " >&6; }
22350if ${ac_cv_path_XATTR+:} false; then :
22351  $as_echo_n "(cached) " >&6
22352else
22353  case $XATTR in
22354  [\\/]* | ?:[\\/]*)
22355  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22356  ;;
22357  *)
22358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22359for as_dir in $PATH
22360do
22361  IFS=$as_save_IFS
22362  test -z "$as_dir" && as_dir=.
22363    for ac_exec_ext in '' $ac_executable_extensions; do
22364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22365    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22367    break 2
22368  fi
22369done
22370  done
22371IFS=$as_save_IFS
22372
22373  ;;
22374esac
22375fi
22376XATTR=$ac_cv_path_XATTR
22377if test -n "$XATTR"; then
22378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22379$as_echo "$XATTR" >&6; }
22380else
22381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22382$as_echo "no" >&6; }
22383fi
22384
22385
22386  test -n "$XATTR" && break
22387done
22388
22389  else
22390    # The variable is set, but is it from the command line or the environment?
22391
22392    # Try to remove the string !XATTR! from our list.
22393    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22394    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22395      # If it failed, the variable was not from the command line. Ignore it,
22396      # but warn the user (except for BASH, which is always set by the calling BASH).
22397      if test "xXATTR" != xBASH; then
22398        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22399$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22400      fi
22401      # Try to locate tool using the code snippet
22402      for ac_prog in xattr
22403do
22404  # Extract the first word of "$ac_prog", so it can be a program name with args.
22405set dummy $ac_prog; ac_word=$2
22406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22407$as_echo_n "checking for $ac_word... " >&6; }
22408if ${ac_cv_path_XATTR+:} false; then :
22409  $as_echo_n "(cached) " >&6
22410else
22411  case $XATTR in
22412  [\\/]* | ?:[\\/]*)
22413  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22414  ;;
22415  *)
22416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22417for as_dir in $PATH
22418do
22419  IFS=$as_save_IFS
22420  test -z "$as_dir" && as_dir=.
22421    for ac_exec_ext in '' $ac_executable_extensions; do
22422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22423    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22425    break 2
22426  fi
22427done
22428  done
22429IFS=$as_save_IFS
22430
22431  ;;
22432esac
22433fi
22434XATTR=$ac_cv_path_XATTR
22435if test -n "$XATTR"; then
22436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22437$as_echo "$XATTR" >&6; }
22438else
22439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22440$as_echo "no" >&6; }
22441fi
22442
22443
22444  test -n "$XATTR" && break
22445done
22446
22447    else
22448      # If it succeeded, then it was overridden by the user. We will use it
22449      # for the tool.
22450
22451      # First remove it from the list of overridden variables, so we can test
22452      # for unknown variables in the end.
22453      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22454
22455      # Check if we try to supply an empty value
22456      if test "x$XATTR" = x; then
22457        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22458$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22459        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22460$as_echo_n "checking for XATTR... " >&6; }
22461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22462$as_echo "disabled" >&6; }
22463      else
22464        # Check if the provided tool contains a complete path.
22465        tool_specified="$XATTR"
22466        tool_basename="${tool_specified##*/}"
22467        if test "x$tool_basename" = "x$tool_specified"; then
22468          # A command without a complete path is provided, search $PATH.
22469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22470$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22471          # Extract the first word of "$tool_basename", so it can be a program name with args.
22472set dummy $tool_basename; ac_word=$2
22473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22474$as_echo_n "checking for $ac_word... " >&6; }
22475if ${ac_cv_path_XATTR+:} false; then :
22476  $as_echo_n "(cached) " >&6
22477else
22478  case $XATTR in
22479  [\\/]* | ?:[\\/]*)
22480  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22481  ;;
22482  *)
22483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22484for as_dir in $PATH
22485do
22486  IFS=$as_save_IFS
22487  test -z "$as_dir" && as_dir=.
22488    for ac_exec_ext in '' $ac_executable_extensions; do
22489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22490    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22492    break 2
22493  fi
22494done
22495  done
22496IFS=$as_save_IFS
22497
22498  ;;
22499esac
22500fi
22501XATTR=$ac_cv_path_XATTR
22502if test -n "$XATTR"; then
22503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22504$as_echo "$XATTR" >&6; }
22505else
22506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22507$as_echo "no" >&6; }
22508fi
22509
22510
22511          if test "x$XATTR" = x; then
22512            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22513          fi
22514        else
22515          # Otherwise we believe it is a complete path. Use it as it is.
22516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22517$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22518          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22519$as_echo_n "checking for XATTR... " >&6; }
22520          if test ! -x "$tool_specified"; then
22521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22522$as_echo "not found" >&6; }
22523            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22524          fi
22525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22526$as_echo "$tool_specified" >&6; }
22527        fi
22528      fi
22529    fi
22530
22531  fi
22532
22533
22534
22535  if test "x$XATTR" = x; then
22536    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22537  fi
22538
22539
22540
22541
22542  # Publish this variable in the help.
22543
22544
22545  if [ -z "${CODESIGN+x}" ]; then
22546    # The variable is not set by user, try to locate tool using the code snippet
22547    for ac_prog in codesign
22548do
22549  # Extract the first word of "$ac_prog", so it can be a program name with args.
22550set dummy $ac_prog; ac_word=$2
22551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22552$as_echo_n "checking for $ac_word... " >&6; }
22553if ${ac_cv_path_CODESIGN+:} false; then :
22554  $as_echo_n "(cached) " >&6
22555else
22556  case $CODESIGN in
22557  [\\/]* | ?:[\\/]*)
22558  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22559  ;;
22560  *)
22561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22562for as_dir in $PATH
22563do
22564  IFS=$as_save_IFS
22565  test -z "$as_dir" && as_dir=.
22566    for ac_exec_ext in '' $ac_executable_extensions; do
22567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22568    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22570    break 2
22571  fi
22572done
22573  done
22574IFS=$as_save_IFS
22575
22576  ;;
22577esac
22578fi
22579CODESIGN=$ac_cv_path_CODESIGN
22580if test -n "$CODESIGN"; then
22581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22582$as_echo "$CODESIGN" >&6; }
22583else
22584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22585$as_echo "no" >&6; }
22586fi
22587
22588
22589  test -n "$CODESIGN" && break
22590done
22591
22592  else
22593    # The variable is set, but is it from the command line or the environment?
22594
22595    # Try to remove the string !CODESIGN! from our list.
22596    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22597    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22598      # If it failed, the variable was not from the command line. Ignore it,
22599      # but warn the user (except for BASH, which is always set by the calling BASH).
22600      if test "xCODESIGN" != xBASH; then
22601        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22602$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22603      fi
22604      # Try to locate tool using the code snippet
22605      for ac_prog in codesign
22606do
22607  # Extract the first word of "$ac_prog", so it can be a program name with args.
22608set dummy $ac_prog; ac_word=$2
22609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22610$as_echo_n "checking for $ac_word... " >&6; }
22611if ${ac_cv_path_CODESIGN+:} false; then :
22612  $as_echo_n "(cached) " >&6
22613else
22614  case $CODESIGN in
22615  [\\/]* | ?:[\\/]*)
22616  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22617  ;;
22618  *)
22619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22620for as_dir in $PATH
22621do
22622  IFS=$as_save_IFS
22623  test -z "$as_dir" && as_dir=.
22624    for ac_exec_ext in '' $ac_executable_extensions; do
22625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22626    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22628    break 2
22629  fi
22630done
22631  done
22632IFS=$as_save_IFS
22633
22634  ;;
22635esac
22636fi
22637CODESIGN=$ac_cv_path_CODESIGN
22638if test -n "$CODESIGN"; then
22639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22640$as_echo "$CODESIGN" >&6; }
22641else
22642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22643$as_echo "no" >&6; }
22644fi
22645
22646
22647  test -n "$CODESIGN" && break
22648done
22649
22650    else
22651      # If it succeeded, then it was overridden by the user. We will use it
22652      # for the tool.
22653
22654      # First remove it from the list of overridden variables, so we can test
22655      # for unknown variables in the end.
22656      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22657
22658      # Check if we try to supply an empty value
22659      if test "x$CODESIGN" = x; then
22660        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22661$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22662        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22663$as_echo_n "checking for CODESIGN... " >&6; }
22664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22665$as_echo "disabled" >&6; }
22666      else
22667        # Check if the provided tool contains a complete path.
22668        tool_specified="$CODESIGN"
22669        tool_basename="${tool_specified##*/}"
22670        if test "x$tool_basename" = "x$tool_specified"; then
22671          # A command without a complete path is provided, search $PATH.
22672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22673$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22674          # Extract the first word of "$tool_basename", so it can be a program name with args.
22675set dummy $tool_basename; ac_word=$2
22676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22677$as_echo_n "checking for $ac_word... " >&6; }
22678if ${ac_cv_path_CODESIGN+:} false; then :
22679  $as_echo_n "(cached) " >&6
22680else
22681  case $CODESIGN in
22682  [\\/]* | ?:[\\/]*)
22683  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22684  ;;
22685  *)
22686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22687for as_dir in $PATH
22688do
22689  IFS=$as_save_IFS
22690  test -z "$as_dir" && as_dir=.
22691    for ac_exec_ext in '' $ac_executable_extensions; do
22692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22693    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22695    break 2
22696  fi
22697done
22698  done
22699IFS=$as_save_IFS
22700
22701  ;;
22702esac
22703fi
22704CODESIGN=$ac_cv_path_CODESIGN
22705if test -n "$CODESIGN"; then
22706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22707$as_echo "$CODESIGN" >&6; }
22708else
22709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22710$as_echo "no" >&6; }
22711fi
22712
22713
22714          if test "x$CODESIGN" = x; then
22715            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22716          fi
22717        else
22718          # Otherwise we believe it is a complete path. Use it as it is.
22719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22720$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22721          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22722$as_echo_n "checking for CODESIGN... " >&6; }
22723          if test ! -x "$tool_specified"; then
22724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22725$as_echo "not found" >&6; }
22726            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22727          fi
22728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22729$as_echo "$tool_specified" >&6; }
22730        fi
22731      fi
22732    fi
22733
22734  fi
22735
22736
22737    if test "x$CODESIGN" != "x"; then
22738      # Verify that the openjdk_codesign certificate is present
22739      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22740$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22741      rm -f codesign-testfile
22742      touch codesign-testfile
22743      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22744      rm -f codesign-testfile
22745      if test "x$CODESIGN" = x; then
22746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22747$as_echo "no" >&6; }
22748      else
22749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22750$as_echo "yes" >&6; }
22751      fi
22752    fi
22753
22754
22755
22756  # Publish this variable in the help.
22757
22758
22759  if [ -z "${SETFILE+x}" ]; then
22760    # The variable is not set by user, try to locate tool using the code snippet
22761    for ac_prog in SetFile
22762do
22763  # Extract the first word of "$ac_prog", so it can be a program name with args.
22764set dummy $ac_prog; ac_word=$2
22765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22766$as_echo_n "checking for $ac_word... " >&6; }
22767if ${ac_cv_path_SETFILE+:} false; then :
22768  $as_echo_n "(cached) " >&6
22769else
22770  case $SETFILE in
22771  [\\/]* | ?:[\\/]*)
22772  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22773  ;;
22774  *)
22775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22776for as_dir in $PATH
22777do
22778  IFS=$as_save_IFS
22779  test -z "$as_dir" && as_dir=.
22780    for ac_exec_ext in '' $ac_executable_extensions; do
22781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22782    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22784    break 2
22785  fi
22786done
22787  done
22788IFS=$as_save_IFS
22789
22790  ;;
22791esac
22792fi
22793SETFILE=$ac_cv_path_SETFILE
22794if test -n "$SETFILE"; then
22795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22796$as_echo "$SETFILE" >&6; }
22797else
22798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22799$as_echo "no" >&6; }
22800fi
22801
22802
22803  test -n "$SETFILE" && break
22804done
22805
22806  else
22807    # The variable is set, but is it from the command line or the environment?
22808
22809    # Try to remove the string !SETFILE! from our list.
22810    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22811    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22812      # If it failed, the variable was not from the command line. Ignore it,
22813      # but warn the user (except for BASH, which is always set by the calling BASH).
22814      if test "xSETFILE" != xBASH; then
22815        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22816$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22817      fi
22818      # Try to locate tool using the code snippet
22819      for ac_prog in SetFile
22820do
22821  # Extract the first word of "$ac_prog", so it can be a program name with args.
22822set dummy $ac_prog; ac_word=$2
22823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22824$as_echo_n "checking for $ac_word... " >&6; }
22825if ${ac_cv_path_SETFILE+:} false; then :
22826  $as_echo_n "(cached) " >&6
22827else
22828  case $SETFILE in
22829  [\\/]* | ?:[\\/]*)
22830  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22831  ;;
22832  *)
22833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22834for as_dir in $PATH
22835do
22836  IFS=$as_save_IFS
22837  test -z "$as_dir" && as_dir=.
22838    for ac_exec_ext in '' $ac_executable_extensions; do
22839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22840    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22842    break 2
22843  fi
22844done
22845  done
22846IFS=$as_save_IFS
22847
22848  ;;
22849esac
22850fi
22851SETFILE=$ac_cv_path_SETFILE
22852if test -n "$SETFILE"; then
22853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22854$as_echo "$SETFILE" >&6; }
22855else
22856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22857$as_echo "no" >&6; }
22858fi
22859
22860
22861  test -n "$SETFILE" && break
22862done
22863
22864    else
22865      # If it succeeded, then it was overridden by the user. We will use it
22866      # for the tool.
22867
22868      # First remove it from the list of overridden variables, so we can test
22869      # for unknown variables in the end.
22870      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22871
22872      # Check if we try to supply an empty value
22873      if test "x$SETFILE" = x; then
22874        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22875$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22877$as_echo_n "checking for SETFILE... " >&6; }
22878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22879$as_echo "disabled" >&6; }
22880      else
22881        # Check if the provided tool contains a complete path.
22882        tool_specified="$SETFILE"
22883        tool_basename="${tool_specified##*/}"
22884        if test "x$tool_basename" = "x$tool_specified"; then
22885          # A command without a complete path is provided, search $PATH.
22886          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22887$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22888          # Extract the first word of "$tool_basename", so it can be a program name with args.
22889set dummy $tool_basename; ac_word=$2
22890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22891$as_echo_n "checking for $ac_word... " >&6; }
22892if ${ac_cv_path_SETFILE+:} false; then :
22893  $as_echo_n "(cached) " >&6
22894else
22895  case $SETFILE in
22896  [\\/]* | ?:[\\/]*)
22897  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22898  ;;
22899  *)
22900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22901for as_dir in $PATH
22902do
22903  IFS=$as_save_IFS
22904  test -z "$as_dir" && as_dir=.
22905    for ac_exec_ext in '' $ac_executable_extensions; do
22906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22907    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22909    break 2
22910  fi
22911done
22912  done
22913IFS=$as_save_IFS
22914
22915  ;;
22916esac
22917fi
22918SETFILE=$ac_cv_path_SETFILE
22919if test -n "$SETFILE"; then
22920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22921$as_echo "$SETFILE" >&6; }
22922else
22923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22924$as_echo "no" >&6; }
22925fi
22926
22927
22928          if test "x$SETFILE" = x; then
22929            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22930          fi
22931        else
22932          # Otherwise we believe it is a complete path. Use it as it is.
22933          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22934$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22935          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22936$as_echo_n "checking for SETFILE... " >&6; }
22937          if test ! -x "$tool_specified"; then
22938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22939$as_echo "not found" >&6; }
22940            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22941          fi
22942          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22943$as_echo "$tool_specified" >&6; }
22944        fi
22945      fi
22946    fi
22947
22948  fi
22949
22950
22951
22952  if test "x$SETFILE" = x; then
22953    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22954  fi
22955
22956
22957  fi
22958
22959
22960  # Test if bash supports pipefail.
22961  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
22962$as_echo_n "checking if bash supports pipefail... " >&6; }
22963  if ${BASH} -c 'set -o pipefail'; then
22964    BASH_ARGS="$BASH_ARGS -o pipefail"
22965    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22966$as_echo "yes" >&6; }
22967  else
22968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22969$as_echo "no" >&6; }
22970  fi
22971
22972  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
22973$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
22974  if ${BASH} -e -c 'true'; then
22975    BASH_ARGS="$BASH_ARGS -e"
22976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22977$as_echo "yes" >&6; }
22978  else
22979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22980$as_echo "no" >&6; }
22981  fi
22982
22983
22984
22985
22986# Check if pkg-config is available.
22987
22988
22989if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22990	if test -n "$ac_tool_prefix"; then
22991  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22992set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22994$as_echo_n "checking for $ac_word... " >&6; }
22995if ${ac_cv_path_PKG_CONFIG+:} false; then :
22996  $as_echo_n "(cached) " >&6
22997else
22998  case $PKG_CONFIG in
22999  [\\/]* | ?:[\\/]*)
23000  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23001  ;;
23002  *)
23003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23004for as_dir in $PATH
23005do
23006  IFS=$as_save_IFS
23007  test -z "$as_dir" && as_dir=.
23008    for ac_exec_ext in '' $ac_executable_extensions; do
23009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23010    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23012    break 2
23013  fi
23014done
23015  done
23016IFS=$as_save_IFS
23017
23018  ;;
23019esac
23020fi
23021PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23022if test -n "$PKG_CONFIG"; then
23023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23024$as_echo "$PKG_CONFIG" >&6; }
23025else
23026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23027$as_echo "no" >&6; }
23028fi
23029
23030
23031fi
23032if test -z "$ac_cv_path_PKG_CONFIG"; then
23033  ac_pt_PKG_CONFIG=$PKG_CONFIG
23034  # Extract the first word of "pkg-config", so it can be a program name with args.
23035set dummy pkg-config; ac_word=$2
23036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23037$as_echo_n "checking for $ac_word... " >&6; }
23038if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23039  $as_echo_n "(cached) " >&6
23040else
23041  case $ac_pt_PKG_CONFIG in
23042  [\\/]* | ?:[\\/]*)
23043  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23044  ;;
23045  *)
23046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23047for as_dir in $PATH
23048do
23049  IFS=$as_save_IFS
23050  test -z "$as_dir" && as_dir=.
23051    for ac_exec_ext in '' $ac_executable_extensions; do
23052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23053    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23055    break 2
23056  fi
23057done
23058  done
23059IFS=$as_save_IFS
23060
23061  ;;
23062esac
23063fi
23064ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23065if test -n "$ac_pt_PKG_CONFIG"; then
23066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23067$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23068else
23069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23070$as_echo "no" >&6; }
23071fi
23072
23073  if test "x$ac_pt_PKG_CONFIG" = x; then
23074    PKG_CONFIG=""
23075  else
23076    case $cross_compiling:$ac_tool_warned in
23077yes:)
23078{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23079$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23080ac_tool_warned=yes ;;
23081esac
23082    PKG_CONFIG=$ac_pt_PKG_CONFIG
23083  fi
23084else
23085  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23086fi
23087
23088fi
23089if test -n "$PKG_CONFIG"; then
23090	_pkg_min_version=0.9.0
23091	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23092$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23093	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23094		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23095$as_echo "yes" >&6; }
23096	else
23097		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23098$as_echo "no" >&6; }
23099		PKG_CONFIG=""
23100	fi
23101
23102fi
23103
23104# After basic tools have been setup, we can check build os specific details.
23105
23106  ###############################################################################
23107
23108  # Note that this is the build platform OS version!
23109
23110  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23111  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23112  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23113  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23114
23115
23116
23117
23118
23119# Misc basic settings
23120
23121
23122# Check whether --with-default-make-target was given.
23123if test "${with_default_make_target+set}" = set; then :
23124  withval=$with_default_make_target;
23125fi
23126
23127  if test "x$with_default_make_target" = "x" \
23128      || test "x$with_default_make_target" = "xyes"; then
23129    DEFAULT_MAKE_TARGET="exploded-image"
23130  elif test "x$with_default_make_target" = "xno"; then
23131    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23132  else
23133    DEFAULT_MAKE_TARGET="$with_default_make_target"
23134  fi
23135
23136
23137
23138
23139###############################################################################
23140#
23141# Determine OpenJDK variants, options and version numbers.
23142#
23143###############################################################################
23144
23145# We need build & target for this.
23146
23147  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23148  # We always build headless support.
23149  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23150$as_echo_n "checking headful support... " >&6; }
23151  # Check whether --enable-headful was given.
23152if test "${enable_headful+set}" = set; then :
23153  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23154else
23155  SUPPORT_HEADFUL=yes
23156fi
23157
23158
23159  SUPPORT_HEADLESS=yes
23160  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23161
23162  if test "x$SUPPORT_HEADFUL" = xyes; then
23163    # We are building both headful and headless.
23164    headful_msg="include support for both headful and headless"
23165  fi
23166
23167  if test "x$SUPPORT_HEADFUL" = xno; then
23168    # Thus we are building headless only.
23169    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23170    headful_msg="headless only"
23171  fi
23172
23173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23174$as_echo "$headful_msg" >&6; }
23175
23176
23177
23178
23179
23180  # Choose cacerts source file
23181
23182# Check whether --with-cacerts-file was given.
23183if test "${with_cacerts_file+set}" = set; then :
23184  withval=$with_cacerts_file;
23185fi
23186
23187  if test "x$with_cacerts_file" != x; then
23188    CACERTS_FILE=$with_cacerts_file
23189  fi
23190
23191
23192  # Enable or disable unlimited crypto
23193  # Check whether --enable-unlimited-crypto was given.
23194if test "${enable_unlimited_crypto+set}" = set; then :
23195  enableval=$enable_unlimited_crypto;
23196else
23197  enable_unlimited_crypto=no
23198fi
23199
23200  if test "x$enable_unlimited_crypto" = "xyes"; then
23201    UNLIMITED_CRYPTO=true
23202  else
23203    UNLIMITED_CRYPTO=false
23204  fi
23205
23206
23207  # Compress jars
23208  COMPRESS_JARS=false
23209
23210
23211
23212  # Setup default copyright year. Mostly overridden when building close to a new year.
23213
23214# Check whether --with-copyright-year was given.
23215if test "${with_copyright_year+set}" = set; then :
23216  withval=$with_copyright_year;
23217fi
23218
23219  if test "x$with_copyright_year" = xyes; then
23220    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23221  elif test "x$with_copyright_year" != x; then
23222    COPYRIGHT_YEAR="$with_copyright_year"
23223  else
23224    COPYRIGHT_YEAR=`date +'%Y'`
23225  fi
23226
23227
23228
23229  # Control wether Hotspot runs Queens test after build.
23230  # Check whether --enable-hotspot-test-in-build was given.
23231if test "${enable_hotspot_test_in_build+set}" = set; then :
23232  enableval=$enable_hotspot_test_in_build;
23233else
23234  enable_hotspot_test_in_build=no
23235fi
23236
23237  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23238    TEST_IN_BUILD=true
23239  else
23240    TEST_IN_BUILD=false
23241  fi
23242
23243
23244
23245  # Warn user that old version arguments are deprecated.
23246
23247
23248# Check whether --with-milestone was given.
23249if test "${with_milestone+set}" = set; then :
23250  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23251$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23252fi
23253
23254
23255
23256
23257# Check whether --with-update-version was given.
23258if test "${with_update_version+set}" = set; then :
23259  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23260$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23261fi
23262
23263
23264
23265
23266# Check whether --with-user-release-suffix was given.
23267if test "${with_user_release_suffix+set}" = set; then :
23268  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
23269$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23270fi
23271
23272
23273
23274
23275# Check whether --with-build-number was given.
23276if test "${with_build_number+set}" = set; then :
23277  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23278$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23279fi
23280
23281
23282
23283  # Source the version numbers file
23284  . $AUTOCONF_DIR/version-numbers
23285
23286  # Some non-version number information is set in that file
23287
23288
23289
23290
23291
23292
23293
23294
23295  # Override version from arguments
23296
23297  # If --with-version-string is set, process it first. It is possible to
23298  # override parts with more specific flags, since these are processed later.
23299
23300# Check whether --with-version-string was given.
23301if test "${with_version_string+set}" = set; then :
23302  withval=$with_version_string;
23303fi
23304
23305  if test "x$with_version_string" = xyes; then
23306    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23307  elif test "x$with_version_string" != x; then
23308    # Additional [] needed to keep m4 from mangling shell constructs.
23309    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23310      VERSION_MAJOR=${BASH_REMATCH[1]}
23311      VERSION_MINOR=${BASH_REMATCH[3]}
23312      VERSION_SECURITY=${BASH_REMATCH[5]}
23313      VERSION_PATCH=${BASH_REMATCH[7]}
23314      VERSION_PRE=${BASH_REMATCH[9]}
23315      version_plus_separator=${BASH_REMATCH[11]}
23316      VERSION_BUILD=${BASH_REMATCH[12]}
23317      VERSION_OPT=${BASH_REMATCH[14]}
23318      # Unspecified numerical fields are interpreted as 0.
23319      if test "x$VERSION_MINOR" = x; then
23320        VERSION_MINOR=0
23321      fi
23322      if test "x$VERSION_SECURITY" = x; then
23323        VERSION_SECURITY=0
23324      fi
23325      if test "x$VERSION_PATCH" = x; then
23326        VERSION_PATCH=0
23327      fi
23328      if test "x$version_plus_separator" != x \
23329          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23330        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23331      fi
23332      # Stop the version part process from setting default values.
23333      # We still allow them to explicitely override though.
23334      NO_DEFAULT_VERSION_PARTS=true
23335    else
23336      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23337    fi
23338  fi
23339
23340
23341# Check whether --with-version-pre was given.
23342if test "${with_version_pre+set}" = set; then :
23343  withval=$with_version_pre; with_version_pre_present=true
23344else
23345  with_version_pre_present=false
23346fi
23347
23348
23349  if test "x$with_version_pre_present" = xtrue; then
23350    if test "x$with_version_pre" = xyes; then
23351      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23352    elif test "x$with_version_pre" = xno; then
23353      # Interpret --without-* as empty string instead of the literal "no"
23354      VERSION_PRE=
23355    else
23356      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23357       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23358      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23359        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23360$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23361      fi
23362    fi
23363  else
23364    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23365      # Default is to use "internal" as pre
23366      VERSION_PRE="internal"
23367    fi
23368  fi
23369
23370
23371# Check whether --with-version-opt was given.
23372if test "${with_version_opt+set}" = set; then :
23373  withval=$with_version_opt; with_version_opt_present=true
23374else
23375  with_version_opt_present=false
23376fi
23377
23378
23379  if test "x$with_version_opt_present" = xtrue; then
23380    if test "x$with_version_opt" = xyes; then
23381      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23382    elif test "x$with_version_opt" = xno; then
23383      # Interpret --without-* as empty string instead of the literal "no"
23384      VERSION_OPT=
23385    else
23386      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23387       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23388      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23389        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23390$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23391      fi
23392    fi
23393  else
23394    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23395      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23396      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23397      # Outer [ ] to quote m4.
23398       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
23399       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23400      VERSION_OPT="$timestamp.$username.$basedirname"
23401    fi
23402  fi
23403
23404
23405# Check whether --with-version-build was given.
23406if test "${with_version_build+set}" = set; then :
23407  withval=$with_version_build; with_version_build_present=true
23408else
23409  with_version_build_present=false
23410fi
23411
23412
23413  if test "x$with_version_build_present" = xtrue; then
23414    if test "x$with_version_build" = xyes; then
23415      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23416    elif test "x$with_version_build" = xno; then
23417      # Interpret --without-* as empty string instead of the literal "no"
23418      VERSION_BUILD=
23419    elif test "x$with_version_build" = x; then
23420      VERSION_BUILD=
23421    else
23422
23423  # Additional [] needed to keep m4 from mangling shell constructs.
23424  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23425    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23426  fi
23427  # Extract the version number without leading zeros.
23428  cleaned_value=${BASH_REMATCH[1]}
23429  if test "x$cleaned_value" = x; then
23430    # Special case for zero
23431    cleaned_value=${BASH_REMATCH[2]}
23432  fi
23433
23434  if test $cleaned_value -gt 255; then
23435    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23436  fi
23437  if test "x$cleaned_value" != "x$with_version_build"; then
23438    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23439$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23440  fi
23441  VERSION_BUILD=$cleaned_value
23442
23443    fi
23444  else
23445    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23446      # Default is to not have a build number.
23447      VERSION_BUILD=""
23448      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23449      VERSION_BUILD=0
23450    fi
23451  fi
23452
23453
23454# Check whether --with-version-major was given.
23455if test "${with_version_major+set}" = set; then :
23456  withval=$with_version_major; with_version_major_present=true
23457else
23458  with_version_major_present=false
23459fi
23460
23461
23462  if test "x$with_version_major_present" = xtrue; then
23463    if test "x$with_version_major" = xyes; then
23464      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23465    else
23466
23467  # Additional [] needed to keep m4 from mangling shell constructs.
23468  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23469    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23470  fi
23471  # Extract the version number without leading zeros.
23472  cleaned_value=${BASH_REMATCH[1]}
23473  if test "x$cleaned_value" = x; then
23474    # Special case for zero
23475    cleaned_value=${BASH_REMATCH[2]}
23476  fi
23477
23478  if test $cleaned_value -gt 255; then
23479    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23480  fi
23481  if test "x$cleaned_value" != "x$with_version_major"; then
23482    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23483$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23484  fi
23485  VERSION_MAJOR=$cleaned_value
23486
23487    fi
23488  else
23489    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23490      # Default is to get value from version-numbers
23491      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23492    fi
23493  fi
23494
23495
23496# Check whether --with-version-minor was given.
23497if test "${with_version_minor+set}" = set; then :
23498  withval=$with_version_minor; with_version_minor_present=true
23499else
23500  with_version_minor_present=false
23501fi
23502
23503
23504  if test "x$with_version_minor_present" = xtrue; then
23505    if test "x$with_version_minor" = xyes; then
23506      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23507    elif test "x$with_version_minor" = xno; then
23508      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23509      VERSION_MINOR=0
23510    elif test "x$with_version_minor" = x; then
23511      VERSION_MINOR=0
23512    else
23513
23514  # Additional [] needed to keep m4 from mangling shell constructs.
23515  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23516    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23517  fi
23518  # Extract the version number without leading zeros.
23519  cleaned_value=${BASH_REMATCH[1]}
23520  if test "x$cleaned_value" = x; then
23521    # Special case for zero
23522    cleaned_value=${BASH_REMATCH[2]}
23523  fi
23524
23525  if test $cleaned_value -gt 255; then
23526    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23527  fi
23528  if test "x$cleaned_value" != "x$with_version_minor"; then
23529    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23530$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23531  fi
23532  VERSION_MINOR=$cleaned_value
23533
23534    fi
23535  else
23536    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23537      # Default is 0, if unspecified
23538      VERSION_MINOR=0
23539    fi
23540  fi
23541
23542
23543# Check whether --with-version-security was given.
23544if test "${with_version_security+set}" = set; then :
23545  withval=$with_version_security; with_version_security_present=true
23546else
23547  with_version_security_present=false
23548fi
23549
23550
23551  if test "x$with_version_security_present" = xtrue; then
23552    if test "x$with_version_security" = xyes; then
23553      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23554    elif test "x$with_version_security" = xno; then
23555      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23556      VERSION_SECURITY=0
23557    elif test "x$with_version_security" = x; then
23558      VERSION_SECURITY=0
23559    else
23560
23561  # Additional [] needed to keep m4 from mangling shell constructs.
23562  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23563    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23564  fi
23565  # Extract the version number without leading zeros.
23566  cleaned_value=${BASH_REMATCH[1]}
23567  if test "x$cleaned_value" = x; then
23568    # Special case for zero
23569    cleaned_value=${BASH_REMATCH[2]}
23570  fi
23571
23572  if test $cleaned_value -gt 255; then
23573    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23574  fi
23575  if test "x$cleaned_value" != "x$with_version_security"; then
23576    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23577$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23578  fi
23579  VERSION_SECURITY=$cleaned_value
23580
23581    fi
23582  else
23583    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23584      # Default is 0, if unspecified
23585      VERSION_SECURITY=0
23586    fi
23587  fi
23588
23589
23590# Check whether --with-version-patch was given.
23591if test "${with_version_patch+set}" = set; then :
23592  withval=$with_version_patch; with_version_patch_present=true
23593else
23594  with_version_patch_present=false
23595fi
23596
23597
23598  if test "x$with_version_patch_present" = xtrue; then
23599    if test "x$with_version_patch" = xyes; then
23600      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23601    elif test "x$with_version_patch" = xno; then
23602      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23603      VERSION_PATCH=0
23604    elif test "x$with_version_patch" = x; then
23605      VERSION_PATCH=0
23606    else
23607
23608  # Additional [] needed to keep m4 from mangling shell constructs.
23609  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23610    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23611  fi
23612  # Extract the version number without leading zeros.
23613  cleaned_value=${BASH_REMATCH[1]}
23614  if test "x$cleaned_value" = x; then
23615    # Special case for zero
23616    cleaned_value=${BASH_REMATCH[2]}
23617  fi
23618
23619  if test $cleaned_value -gt 255; then
23620    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23621  fi
23622  if test "x$cleaned_value" != "x$with_version_patch"; then
23623    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23624$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23625  fi
23626  VERSION_PATCH=$cleaned_value
23627
23628    fi
23629  else
23630    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23631      # Default is 0, if unspecified
23632      VERSION_PATCH=0
23633    fi
23634  fi
23635
23636  # Calculate derived version properties
23637
23638  # Set VERSION_IS_GA based on if VERSION_PRE has a value
23639  if test "x$VERSION_PRE" = x; then
23640    VERSION_IS_GA=true
23641  else
23642    VERSION_IS_GA=false
23643  fi
23644
23645  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23646  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23647
23648  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23649  # Strip trailing zeroes from stripped_version_number
23650  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23651  VERSION_NUMBER=$stripped_version_number
23652
23653  # The complete version string, with additional build information
23654  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23655    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23656  else
23657    # If either build or opt is set, we need a + separator
23658    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23659  fi
23660
23661  # The short version string, just VERSION_NUMBER and PRE, if present.
23662  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23663
23664  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23665$as_echo_n "checking for version string... " >&6; }
23666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23667$as_echo "$VERSION_STRING" >&6; }
23668
23669
23670
23671
23672
23673
23674
23675
23676
23677
23678
23679
23680
23681
23682
23683###############################################################################
23684#
23685# Setup BootJDK, used to bootstrap the build.
23686#
23687###############################################################################
23688
23689
23690  BOOT_JDK_FOUND=no
23691
23692# Check whether --with-boot-jdk was given.
23693if test "${with_boot_jdk+set}" = set; then :
23694  withval=$with_boot_jdk;
23695fi
23696
23697
23698  # We look for the Boot JDK through various means, going from more certain to
23699  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23700  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23701  # must check if this is indeed valid; otherwise we'll continue looking.
23702
23703  # Test: Is bootjdk explicitely set by command line arguments?
23704
23705  if test "x$BOOT_JDK_FOUND" = xno; then
23706    # Now execute the test
23707
23708  if test "x$with_boot_jdk" != x; then
23709    BOOT_JDK=$with_boot_jdk
23710    BOOT_JDK_FOUND=maybe
23711    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23712$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23713  fi
23714
23715
23716    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23717    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23718      # Do we have a bin/java?
23719      if test ! -x "$BOOT_JDK/bin/java"; then
23720        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23721$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23722        BOOT_JDK_FOUND=no
23723      else
23724        # Do we have a bin/javac?
23725        if test ! -x "$BOOT_JDK/bin/javac"; then
23726          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23728          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23729$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23730          BOOT_JDK_FOUND=no
23731        else
23732          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23733          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23734
23735          # Extra M4 quote needed to protect [] in grep expression.
23736          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23737          if test "x$FOUND_CORRECT_VERSION" = x; then
23738            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23739$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23740            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23741$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23742            BOOT_JDK_FOUND=no
23743          else
23744            # We're done! :-)
23745            BOOT_JDK_FOUND=yes
23746
23747  # Only process if variable expands to non-empty
23748
23749  if test "x$BOOT_JDK" != x; then
23750    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23751
23752  # Input might be given as Windows format, start by converting to
23753  # unix format.
23754  path="$BOOT_JDK"
23755  new_path=`$CYGPATH -u "$path"`
23756
23757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23760  # "foo.exe" is OK but "foo" is an error.
23761  #
23762  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23763  # It is also a way to make sure we got the proper file name for the real test later on.
23764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23765  if test "x$test_shortpath" = x; then
23766    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23767$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23768    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23769  fi
23770
23771  # Call helper function which possibly converts this using DOS-style short mode.
23772  # If so, the updated path is stored in $new_path.
23773
23774  input_path="$new_path"
23775  # Check if we need to convert this using DOS-style short mode. If the path
23776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23777  # take no chances and rewrite it.
23778  # Note: m4 eats our [], so we need to use [ and ] instead.
23779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23780  if test "x$has_forbidden_chars" != x; then
23781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23782    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23783    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23784    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23785      # Going to short mode and back again did indeed matter. Since short mode is
23786      # case insensitive, let's make it lowercase to improve readability.
23787      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23788      # Now convert it back to Unix-style (cygpath)
23789      input_path=`$CYGPATH -u "$shortmode_path"`
23790      new_path="$input_path"
23791    fi
23792  fi
23793
23794  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23795  if test "x$test_cygdrive_prefix" = x; then
23796    # As a simple fix, exclude /usr/bin since it's not a real path.
23797    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23798      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23799      # a path prefixed by /cygdrive for fixpath to work.
23800      new_path="$CYGWIN_ROOT_PATH$input_path"
23801    fi
23802  fi
23803
23804
23805  if test "x$path" != "x$new_path"; then
23806    BOOT_JDK="$new_path"
23807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23808$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23809  fi
23810
23811    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23812
23813  path="$BOOT_JDK"
23814  has_colon=`$ECHO $path | $GREP ^.:`
23815  new_path="$path"
23816  if test "x$has_colon" = x; then
23817    # Not in mixed or Windows style, start by that.
23818    new_path=`cmd //c echo $path`
23819  fi
23820
23821
23822  input_path="$new_path"
23823  # Check if we need to convert this using DOS-style short mode. If the path
23824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23825  # take no chances and rewrite it.
23826  # Note: m4 eats our [], so we need to use [ and ] instead.
23827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23828  if test "x$has_forbidden_chars" != x; then
23829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23831  fi
23832
23833
23834  windows_path="$new_path"
23835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23836    unix_path=`$CYGPATH -u "$windows_path"`
23837    new_path="$unix_path"
23838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23840    new_path="$unix_path"
23841  fi
23842
23843  if test "x$path" != "x$new_path"; then
23844    BOOT_JDK="$new_path"
23845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23846$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23847  fi
23848
23849  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23850  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23851
23852    else
23853      # We're on a unix platform. Hooray! :)
23854      path="$BOOT_JDK"
23855      has_space=`$ECHO "$path" | $GREP " "`
23856      if test "x$has_space" != x; then
23857        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23858$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23859        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23860      fi
23861
23862      # Use eval to expand a potential ~
23863      eval path="$path"
23864      if test ! -f "$path" && test ! -d "$path"; then
23865        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23866      fi
23867
23868      if test -d "$path"; then
23869        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23870      else
23871        dir="`$DIRNAME "$path"`"
23872        base="`$BASENAME "$path"`"
23873        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
23874      fi
23875    fi
23876  fi
23877
23878            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23879$as_echo_n "checking for Boot JDK... " >&6; }
23880            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23881$as_echo "$BOOT_JDK" >&6; }
23882            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23883$as_echo_n "checking Boot JDK version... " >&6; }
23884            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23885            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23886$as_echo "$BOOT_JDK_VERSION" >&6; }
23887          fi # end check jdk version
23888        fi # end check javac
23889      fi # end check java
23890    fi # end check boot jdk found
23891  fi
23892
23893  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23894    # Having specified an argument which is incorrect will produce an instant failure;
23895    # we should not go on looking
23896    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23897  fi
23898
23899  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23900
23901  if test "x$BOOT_JDK_FOUND" = xno; then
23902    # Now execute the test
23903
23904  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23905    # First check at user selected default
23906
23907  if test "x$BOOT_JDK_FOUND" = xno; then
23908    # Now execute the test
23909
23910  if test -x /usr/libexec/java_home; then
23911    BOOT_JDK=`/usr/libexec/java_home `
23912    BOOT_JDK_FOUND=maybe
23913    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23914$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23915  fi
23916
23917
23918    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23919    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23920      # Do we have a bin/java?
23921      if test ! -x "$BOOT_JDK/bin/java"; then
23922        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23923$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23924        BOOT_JDK_FOUND=no
23925      else
23926        # Do we have a bin/javac?
23927        if test ! -x "$BOOT_JDK/bin/javac"; then
23928          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23930          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23931$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23932          BOOT_JDK_FOUND=no
23933        else
23934          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23935          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23936
23937          # Extra M4 quote needed to protect [] in grep expression.
23938          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23939          if test "x$FOUND_CORRECT_VERSION" = x; then
23940            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23942            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23943$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23944            BOOT_JDK_FOUND=no
23945          else
23946            # We're done! :-)
23947            BOOT_JDK_FOUND=yes
23948
23949  # Only process if variable expands to non-empty
23950
23951  if test "x$BOOT_JDK" != x; then
23952    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23953
23954  # Input might be given as Windows format, start by converting to
23955  # unix format.
23956  path="$BOOT_JDK"
23957  new_path=`$CYGPATH -u "$path"`
23958
23959  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23960  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23961  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23962  # "foo.exe" is OK but "foo" is an error.
23963  #
23964  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23965  # It is also a way to make sure we got the proper file name for the real test later on.
23966  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23967  if test "x$test_shortpath" = x; then
23968    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23969$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23970    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23971  fi
23972
23973  # Call helper function which possibly converts this using DOS-style short mode.
23974  # If so, the updated path is stored in $new_path.
23975
23976  input_path="$new_path"
23977  # Check if we need to convert this using DOS-style short mode. If the path
23978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23979  # take no chances and rewrite it.
23980  # Note: m4 eats our [], so we need to use [ and ] instead.
23981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23982  if test "x$has_forbidden_chars" != x; then
23983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23984    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23985    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23986    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23987      # Going to short mode and back again did indeed matter. Since short mode is
23988      # case insensitive, let's make it lowercase to improve readability.
23989      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23990      # Now convert it back to Unix-style (cygpath)
23991      input_path=`$CYGPATH -u "$shortmode_path"`
23992      new_path="$input_path"
23993    fi
23994  fi
23995
23996  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23997  if test "x$test_cygdrive_prefix" = x; then
23998    # As a simple fix, exclude /usr/bin since it's not a real path.
23999    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24000      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24001      # a path prefixed by /cygdrive for fixpath to work.
24002      new_path="$CYGWIN_ROOT_PATH$input_path"
24003    fi
24004  fi
24005
24006
24007  if test "x$path" != "x$new_path"; then
24008    BOOT_JDK="$new_path"
24009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24010$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24011  fi
24012
24013    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24014
24015  path="$BOOT_JDK"
24016  has_colon=`$ECHO $path | $GREP ^.:`
24017  new_path="$path"
24018  if test "x$has_colon" = x; then
24019    # Not in mixed or Windows style, start by that.
24020    new_path=`cmd //c echo $path`
24021  fi
24022
24023
24024  input_path="$new_path"
24025  # Check if we need to convert this using DOS-style short mode. If the path
24026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24027  # take no chances and rewrite it.
24028  # Note: m4 eats our [], so we need to use [ and ] instead.
24029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24030  if test "x$has_forbidden_chars" != x; then
24031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24032    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24033  fi
24034
24035
24036  windows_path="$new_path"
24037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24038    unix_path=`$CYGPATH -u "$windows_path"`
24039    new_path="$unix_path"
24040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24042    new_path="$unix_path"
24043  fi
24044
24045  if test "x$path" != "x$new_path"; then
24046    BOOT_JDK="$new_path"
24047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24048$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24049  fi
24050
24051  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24052  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24053
24054    else
24055      # We're on a unix platform. Hooray! :)
24056      path="$BOOT_JDK"
24057      has_space=`$ECHO "$path" | $GREP " "`
24058      if test "x$has_space" != x; then
24059        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24060$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24061        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24062      fi
24063
24064      # Use eval to expand a potential ~
24065      eval path="$path"
24066      if test ! -f "$path" && test ! -d "$path"; then
24067        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24068      fi
24069
24070      if test -d "$path"; then
24071        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24072      else
24073        dir="`$DIRNAME "$path"`"
24074        base="`$BASENAME "$path"`"
24075        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24076      fi
24077    fi
24078  fi
24079
24080            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24081$as_echo_n "checking for Boot JDK... " >&6; }
24082            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24083$as_echo "$BOOT_JDK" >&6; }
24084            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24085$as_echo_n "checking Boot JDK version... " >&6; }
24086            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24087            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24088$as_echo "$BOOT_JDK_VERSION" >&6; }
24089          fi # end check jdk version
24090        fi # end check javac
24091      fi # end check java
24092    fi # end check boot jdk found
24093  fi
24094
24095    # If that did not work out (e.g. too old), try explicit versions instead
24096
24097  if test "x$BOOT_JDK_FOUND" = xno; then
24098    # Now execute the test
24099
24100  if test -x /usr/libexec/java_home; then
24101    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24102    BOOT_JDK_FOUND=maybe
24103    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24104$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24105  fi
24106
24107
24108    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24109    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24110      # Do we have a bin/java?
24111      if test ! -x "$BOOT_JDK/bin/java"; then
24112        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24113$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24114        BOOT_JDK_FOUND=no
24115      else
24116        # Do we have a bin/javac?
24117        if test ! -x "$BOOT_JDK/bin/javac"; then
24118          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24119$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24120          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24121$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24122          BOOT_JDK_FOUND=no
24123        else
24124          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24125          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24126
24127          # Extra M4 quote needed to protect [] in grep expression.
24128          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24129          if test "x$FOUND_CORRECT_VERSION" = x; then
24130            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24131$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24132            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24133$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24134            BOOT_JDK_FOUND=no
24135          else
24136            # We're done! :-)
24137            BOOT_JDK_FOUND=yes
24138
24139  # Only process if variable expands to non-empty
24140
24141  if test "x$BOOT_JDK" != x; then
24142    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24143
24144  # Input might be given as Windows format, start by converting to
24145  # unix format.
24146  path="$BOOT_JDK"
24147  new_path=`$CYGPATH -u "$path"`
24148
24149  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24150  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24151  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24152  # "foo.exe" is OK but "foo" is an error.
24153  #
24154  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24155  # It is also a way to make sure we got the proper file name for the real test later on.
24156  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24157  if test "x$test_shortpath" = x; then
24158    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24159$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24160    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24161  fi
24162
24163  # Call helper function which possibly converts this using DOS-style short mode.
24164  # If so, the updated path is stored in $new_path.
24165
24166  input_path="$new_path"
24167  # Check if we need to convert this using DOS-style short mode. If the path
24168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24169  # take no chances and rewrite it.
24170  # Note: m4 eats our [], so we need to use [ and ] instead.
24171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24172  if test "x$has_forbidden_chars" != x; then
24173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24174    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24175    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24176    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24177      # Going to short mode and back again did indeed matter. Since short mode is
24178      # case insensitive, let's make it lowercase to improve readability.
24179      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24180      # Now convert it back to Unix-style (cygpath)
24181      input_path=`$CYGPATH -u "$shortmode_path"`
24182      new_path="$input_path"
24183    fi
24184  fi
24185
24186  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24187  if test "x$test_cygdrive_prefix" = x; then
24188    # As a simple fix, exclude /usr/bin since it's not a real path.
24189    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24190      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24191      # a path prefixed by /cygdrive for fixpath to work.
24192      new_path="$CYGWIN_ROOT_PATH$input_path"
24193    fi
24194  fi
24195
24196
24197  if test "x$path" != "x$new_path"; then
24198    BOOT_JDK="$new_path"
24199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24200$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24201  fi
24202
24203    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24204
24205  path="$BOOT_JDK"
24206  has_colon=`$ECHO $path | $GREP ^.:`
24207  new_path="$path"
24208  if test "x$has_colon" = x; then
24209    # Not in mixed or Windows style, start by that.
24210    new_path=`cmd //c echo $path`
24211  fi
24212
24213
24214  input_path="$new_path"
24215  # Check if we need to convert this using DOS-style short mode. If the path
24216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24217  # take no chances and rewrite it.
24218  # Note: m4 eats our [], so we need to use [ and ] instead.
24219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24220  if test "x$has_forbidden_chars" != x; then
24221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24223  fi
24224
24225
24226  windows_path="$new_path"
24227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24228    unix_path=`$CYGPATH -u "$windows_path"`
24229    new_path="$unix_path"
24230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24232    new_path="$unix_path"
24233  fi
24234
24235  if test "x$path" != "x$new_path"; then
24236    BOOT_JDK="$new_path"
24237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24238$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24239  fi
24240
24241  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24242  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24243
24244    else
24245      # We're on a unix platform. Hooray! :)
24246      path="$BOOT_JDK"
24247      has_space=`$ECHO "$path" | $GREP " "`
24248      if test "x$has_space" != x; then
24249        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24250$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24251        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24252      fi
24253
24254      # Use eval to expand a potential ~
24255      eval path="$path"
24256      if test ! -f "$path" && test ! -d "$path"; then
24257        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24258      fi
24259
24260      if test -d "$path"; then
24261        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24262      else
24263        dir="`$DIRNAME "$path"`"
24264        base="`$BASENAME "$path"`"
24265        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24266      fi
24267    fi
24268  fi
24269
24270            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24271$as_echo_n "checking for Boot JDK... " >&6; }
24272            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24273$as_echo "$BOOT_JDK" >&6; }
24274            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24275$as_echo_n "checking Boot JDK version... " >&6; }
24276            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24277            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24278$as_echo "$BOOT_JDK_VERSION" >&6; }
24279          fi # end check jdk version
24280        fi # end check javac
24281      fi # end check java
24282    fi # end check boot jdk found
24283  fi
24284
24285
24286  if test "x$BOOT_JDK_FOUND" = xno; then
24287    # Now execute the test
24288
24289  if test -x /usr/libexec/java_home; then
24290    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24291    BOOT_JDK_FOUND=maybe
24292    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24293$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24294  fi
24295
24296
24297    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24298    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24299      # Do we have a bin/java?
24300      if test ! -x "$BOOT_JDK/bin/java"; then
24301        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24302$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24303        BOOT_JDK_FOUND=no
24304      else
24305        # Do we have a bin/javac?
24306        if test ! -x "$BOOT_JDK/bin/javac"; then
24307          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24308$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24309          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24310$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24311          BOOT_JDK_FOUND=no
24312        else
24313          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24314          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24315
24316          # Extra M4 quote needed to protect [] in grep expression.
24317          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24318          if test "x$FOUND_CORRECT_VERSION" = x; then
24319            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24321            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24322$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24323            BOOT_JDK_FOUND=no
24324          else
24325            # We're done! :-)
24326            BOOT_JDK_FOUND=yes
24327
24328  # Only process if variable expands to non-empty
24329
24330  if test "x$BOOT_JDK" != x; then
24331    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24332
24333  # Input might be given as Windows format, start by converting to
24334  # unix format.
24335  path="$BOOT_JDK"
24336  new_path=`$CYGPATH -u "$path"`
24337
24338  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24339  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24340  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24341  # "foo.exe" is OK but "foo" is an error.
24342  #
24343  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24344  # It is also a way to make sure we got the proper file name for the real test later on.
24345  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24346  if test "x$test_shortpath" = x; then
24347    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24348$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24349    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24350  fi
24351
24352  # Call helper function which possibly converts this using DOS-style short mode.
24353  # If so, the updated path is stored in $new_path.
24354
24355  input_path="$new_path"
24356  # Check if we need to convert this using DOS-style short mode. If the path
24357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24358  # take no chances and rewrite it.
24359  # Note: m4 eats our [], so we need to use [ and ] instead.
24360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24361  if test "x$has_forbidden_chars" != x; then
24362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24363    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24364    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24365    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24366      # Going to short mode and back again did indeed matter. Since short mode is
24367      # case insensitive, let's make it lowercase to improve readability.
24368      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24369      # Now convert it back to Unix-style (cygpath)
24370      input_path=`$CYGPATH -u "$shortmode_path"`
24371      new_path="$input_path"
24372    fi
24373  fi
24374
24375  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24376  if test "x$test_cygdrive_prefix" = x; then
24377    # As a simple fix, exclude /usr/bin since it's not a real path.
24378    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24379      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24380      # a path prefixed by /cygdrive for fixpath to work.
24381      new_path="$CYGWIN_ROOT_PATH$input_path"
24382    fi
24383  fi
24384
24385
24386  if test "x$path" != "x$new_path"; then
24387    BOOT_JDK="$new_path"
24388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24389$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24390  fi
24391
24392    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24393
24394  path="$BOOT_JDK"
24395  has_colon=`$ECHO $path | $GREP ^.:`
24396  new_path="$path"
24397  if test "x$has_colon" = x; then
24398    # Not in mixed or Windows style, start by that.
24399    new_path=`cmd //c echo $path`
24400  fi
24401
24402
24403  input_path="$new_path"
24404  # Check if we need to convert this using DOS-style short mode. If the path
24405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24406  # take no chances and rewrite it.
24407  # Note: m4 eats our [], so we need to use [ and ] instead.
24408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24409  if test "x$has_forbidden_chars" != x; then
24410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24411    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24412  fi
24413
24414
24415  windows_path="$new_path"
24416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24417    unix_path=`$CYGPATH -u "$windows_path"`
24418    new_path="$unix_path"
24419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24421    new_path="$unix_path"
24422  fi
24423
24424  if test "x$path" != "x$new_path"; then
24425    BOOT_JDK="$new_path"
24426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24427$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24428  fi
24429
24430  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24431  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24432
24433    else
24434      # We're on a unix platform. Hooray! :)
24435      path="$BOOT_JDK"
24436      has_space=`$ECHO "$path" | $GREP " "`
24437      if test "x$has_space" != x; then
24438        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24439$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24440        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24441      fi
24442
24443      # Use eval to expand a potential ~
24444      eval path="$path"
24445      if test ! -f "$path" && test ! -d "$path"; then
24446        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24447      fi
24448
24449      if test -d "$path"; then
24450        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24451      else
24452        dir="`$DIRNAME "$path"`"
24453        base="`$BASENAME "$path"`"
24454        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24455      fi
24456    fi
24457  fi
24458
24459            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24460$as_echo_n "checking for Boot JDK... " >&6; }
24461            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24462$as_echo "$BOOT_JDK" >&6; }
24463            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24464$as_echo_n "checking Boot JDK version... " >&6; }
24465            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24467$as_echo "$BOOT_JDK_VERSION" >&6; }
24468          fi # end check jdk version
24469        fi # end check javac
24470      fi # end check java
24471    fi # end check boot jdk found
24472  fi
24473
24474
24475  if test "x$BOOT_JDK_FOUND" = xno; then
24476    # Now execute the test
24477
24478  if test -x /usr/libexec/java_home; then
24479    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24480    BOOT_JDK_FOUND=maybe
24481    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24482$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24483  fi
24484
24485
24486    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24487    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24488      # Do we have a bin/java?
24489      if test ! -x "$BOOT_JDK/bin/java"; then
24490        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24491$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24492        BOOT_JDK_FOUND=no
24493      else
24494        # Do we have a bin/javac?
24495        if test ! -x "$BOOT_JDK/bin/javac"; then
24496          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24498          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24499$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24500          BOOT_JDK_FOUND=no
24501        else
24502          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24503          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24504
24505          # Extra M4 quote needed to protect [] in grep expression.
24506          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24507          if test "x$FOUND_CORRECT_VERSION" = x; then
24508            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24509$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24510            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24511$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24512            BOOT_JDK_FOUND=no
24513          else
24514            # We're done! :-)
24515            BOOT_JDK_FOUND=yes
24516
24517  # Only process if variable expands to non-empty
24518
24519  if test "x$BOOT_JDK" != x; then
24520    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24521
24522  # Input might be given as Windows format, start by converting to
24523  # unix format.
24524  path="$BOOT_JDK"
24525  new_path=`$CYGPATH -u "$path"`
24526
24527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24530  # "foo.exe" is OK but "foo" is an error.
24531  #
24532  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24533  # It is also a way to make sure we got the proper file name for the real test later on.
24534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24535  if test "x$test_shortpath" = x; then
24536    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24537$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24538    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24539  fi
24540
24541  # Call helper function which possibly converts this using DOS-style short mode.
24542  # If so, the updated path is stored in $new_path.
24543
24544  input_path="$new_path"
24545  # Check if we need to convert this using DOS-style short mode. If the path
24546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24547  # take no chances and rewrite it.
24548  # Note: m4 eats our [], so we need to use [ and ] instead.
24549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24550  if test "x$has_forbidden_chars" != x; then
24551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24552    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24553    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24554    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24555      # Going to short mode and back again did indeed matter. Since short mode is
24556      # case insensitive, let's make it lowercase to improve readability.
24557      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24558      # Now convert it back to Unix-style (cygpath)
24559      input_path=`$CYGPATH -u "$shortmode_path"`
24560      new_path="$input_path"
24561    fi
24562  fi
24563
24564  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24565  if test "x$test_cygdrive_prefix" = x; then
24566    # As a simple fix, exclude /usr/bin since it's not a real path.
24567    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24568      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24569      # a path prefixed by /cygdrive for fixpath to work.
24570      new_path="$CYGWIN_ROOT_PATH$input_path"
24571    fi
24572  fi
24573
24574
24575  if test "x$path" != "x$new_path"; then
24576    BOOT_JDK="$new_path"
24577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24578$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24579  fi
24580
24581    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24582
24583  path="$BOOT_JDK"
24584  has_colon=`$ECHO $path | $GREP ^.:`
24585  new_path="$path"
24586  if test "x$has_colon" = x; then
24587    # Not in mixed or Windows style, start by that.
24588    new_path=`cmd //c echo $path`
24589  fi
24590
24591
24592  input_path="$new_path"
24593  # Check if we need to convert this using DOS-style short mode. If the path
24594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24595  # take no chances and rewrite it.
24596  # Note: m4 eats our [], so we need to use [ and ] instead.
24597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24598  if test "x$has_forbidden_chars" != x; then
24599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24600    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24601  fi
24602
24603
24604  windows_path="$new_path"
24605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24606    unix_path=`$CYGPATH -u "$windows_path"`
24607    new_path="$unix_path"
24608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24610    new_path="$unix_path"
24611  fi
24612
24613  if test "x$path" != "x$new_path"; then
24614    BOOT_JDK="$new_path"
24615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24616$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24617  fi
24618
24619  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24620  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24621
24622    else
24623      # We're on a unix platform. Hooray! :)
24624      path="$BOOT_JDK"
24625      has_space=`$ECHO "$path" | $GREP " "`
24626      if test "x$has_space" != x; then
24627        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24628$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24629        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24630      fi
24631
24632      # Use eval to expand a potential ~
24633      eval path="$path"
24634      if test ! -f "$path" && test ! -d "$path"; then
24635        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24636      fi
24637
24638      if test -d "$path"; then
24639        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24640      else
24641        dir="`$DIRNAME "$path"`"
24642        base="`$BASENAME "$path"`"
24643        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24644      fi
24645    fi
24646  fi
24647
24648            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24649$as_echo_n "checking for Boot JDK... " >&6; }
24650            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24651$as_echo "$BOOT_JDK" >&6; }
24652            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24653$as_echo_n "checking Boot JDK version... " >&6; }
24654            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24655            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24656$as_echo "$BOOT_JDK_VERSION" >&6; }
24657          fi # end check jdk version
24658        fi # end check javac
24659      fi # end check java
24660    fi # end check boot jdk found
24661  fi
24662
24663  fi
24664
24665
24666    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24667    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24668      # Do we have a bin/java?
24669      if test ! -x "$BOOT_JDK/bin/java"; then
24670        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24672        BOOT_JDK_FOUND=no
24673      else
24674        # Do we have a bin/javac?
24675        if test ! -x "$BOOT_JDK/bin/javac"; then
24676          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24677$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24678          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24679$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24680          BOOT_JDK_FOUND=no
24681        else
24682          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24683          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24684
24685          # Extra M4 quote needed to protect [] in grep expression.
24686          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24687          if test "x$FOUND_CORRECT_VERSION" = x; then
24688            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24690            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24691$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24692            BOOT_JDK_FOUND=no
24693          else
24694            # We're done! :-)
24695            BOOT_JDK_FOUND=yes
24696
24697  # Only process if variable expands to non-empty
24698
24699  if test "x$BOOT_JDK" != x; then
24700    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24701
24702  # Input might be given as Windows format, start by converting to
24703  # unix format.
24704  path="$BOOT_JDK"
24705  new_path=`$CYGPATH -u "$path"`
24706
24707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24710  # "foo.exe" is OK but "foo" is an error.
24711  #
24712  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24713  # It is also a way to make sure we got the proper file name for the real test later on.
24714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24715  if test "x$test_shortpath" = x; then
24716    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24717$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24718    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24719  fi
24720
24721  # Call helper function which possibly converts this using DOS-style short mode.
24722  # If so, the updated path is stored in $new_path.
24723
24724  input_path="$new_path"
24725  # Check if we need to convert this using DOS-style short mode. If the path
24726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24727  # take no chances and rewrite it.
24728  # Note: m4 eats our [], so we need to use [ and ] instead.
24729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24730  if test "x$has_forbidden_chars" != x; then
24731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24735      # Going to short mode and back again did indeed matter. Since short mode is
24736      # case insensitive, let's make it lowercase to improve readability.
24737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24738      # Now convert it back to Unix-style (cygpath)
24739      input_path=`$CYGPATH -u "$shortmode_path"`
24740      new_path="$input_path"
24741    fi
24742  fi
24743
24744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24745  if test "x$test_cygdrive_prefix" = x; then
24746    # As a simple fix, exclude /usr/bin since it's not a real path.
24747    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24749      # a path prefixed by /cygdrive for fixpath to work.
24750      new_path="$CYGWIN_ROOT_PATH$input_path"
24751    fi
24752  fi
24753
24754
24755  if test "x$path" != "x$new_path"; then
24756    BOOT_JDK="$new_path"
24757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24758$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24759  fi
24760
24761    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24762
24763  path="$BOOT_JDK"
24764  has_colon=`$ECHO $path | $GREP ^.:`
24765  new_path="$path"
24766  if test "x$has_colon" = x; then
24767    # Not in mixed or Windows style, start by that.
24768    new_path=`cmd //c echo $path`
24769  fi
24770
24771
24772  input_path="$new_path"
24773  # Check if we need to convert this using DOS-style short mode. If the path
24774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24775  # take no chances and rewrite it.
24776  # Note: m4 eats our [], so we need to use [ and ] instead.
24777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24778  if test "x$has_forbidden_chars" != x; then
24779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24781  fi
24782
24783
24784  windows_path="$new_path"
24785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24786    unix_path=`$CYGPATH -u "$windows_path"`
24787    new_path="$unix_path"
24788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24790    new_path="$unix_path"
24791  fi
24792
24793  if test "x$path" != "x$new_path"; then
24794    BOOT_JDK="$new_path"
24795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24796$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24797  fi
24798
24799  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24800  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24801
24802    else
24803      # We're on a unix platform. Hooray! :)
24804      path="$BOOT_JDK"
24805      has_space=`$ECHO "$path" | $GREP " "`
24806      if test "x$has_space" != x; then
24807        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24808$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24809        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24810      fi
24811
24812      # Use eval to expand a potential ~
24813      eval path="$path"
24814      if test ! -f "$path" && test ! -d "$path"; then
24815        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24816      fi
24817
24818      if test -d "$path"; then
24819        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24820      else
24821        dir="`$DIRNAME "$path"`"
24822        base="`$BASENAME "$path"`"
24823        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24824      fi
24825    fi
24826  fi
24827
24828            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24829$as_echo_n "checking for Boot JDK... " >&6; }
24830            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24831$as_echo "$BOOT_JDK" >&6; }
24832            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24833$as_echo_n "checking Boot JDK version... " >&6; }
24834            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24835            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24836$as_echo "$BOOT_JDK_VERSION" >&6; }
24837          fi # end check jdk version
24838        fi # end check javac
24839      fi # end check java
24840    fi # end check boot jdk found
24841  fi
24842
24843
24844  # Test: Is $JAVA_HOME set?
24845
24846  if test "x$BOOT_JDK_FOUND" = xno; then
24847    # Now execute the test
24848
24849  if test "x$JAVA_HOME" != x; then
24850    JAVA_HOME_PROCESSED="$JAVA_HOME"
24851
24852  # Only process if variable expands to non-empty
24853
24854  if test "x$JAVA_HOME_PROCESSED" != x; then
24855    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24856
24857  # Input might be given as Windows format, start by converting to
24858  # unix format.
24859  path="$JAVA_HOME_PROCESSED"
24860  new_path=`$CYGPATH -u "$path"`
24861
24862  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24863  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24864  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24865  # "foo.exe" is OK but "foo" is an error.
24866  #
24867  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24868  # It is also a way to make sure we got the proper file name for the real test later on.
24869  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24870  if test "x$test_shortpath" = x; then
24871    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24872$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24873    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24874  fi
24875
24876  # Call helper function which possibly converts this using DOS-style short mode.
24877  # If so, the updated path is stored in $new_path.
24878
24879  input_path="$new_path"
24880  # Check if we need to convert this using DOS-style short mode. If the path
24881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24882  # take no chances and rewrite it.
24883  # Note: m4 eats our [], so we need to use [ and ] instead.
24884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24885  if test "x$has_forbidden_chars" != x; then
24886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24887    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24888    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24889    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24890      # Going to short mode and back again did indeed matter. Since short mode is
24891      # case insensitive, let's make it lowercase to improve readability.
24892      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24893      # Now convert it back to Unix-style (cygpath)
24894      input_path=`$CYGPATH -u "$shortmode_path"`
24895      new_path="$input_path"
24896    fi
24897  fi
24898
24899  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24900  if test "x$test_cygdrive_prefix" = x; then
24901    # As a simple fix, exclude /usr/bin since it's not a real path.
24902    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24903      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24904      # a path prefixed by /cygdrive for fixpath to work.
24905      new_path="$CYGWIN_ROOT_PATH$input_path"
24906    fi
24907  fi
24908
24909
24910  if test "x$path" != "x$new_path"; then
24911    JAVA_HOME_PROCESSED="$new_path"
24912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24913$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24914  fi
24915
24916    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24917
24918  path="$JAVA_HOME_PROCESSED"
24919  has_colon=`$ECHO $path | $GREP ^.:`
24920  new_path="$path"
24921  if test "x$has_colon" = x; then
24922    # Not in mixed or Windows style, start by that.
24923    new_path=`cmd //c echo $path`
24924  fi
24925
24926
24927  input_path="$new_path"
24928  # Check if we need to convert this using DOS-style short mode. If the path
24929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24930  # take no chances and rewrite it.
24931  # Note: m4 eats our [], so we need to use [ and ] instead.
24932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24933  if test "x$has_forbidden_chars" != x; then
24934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24936  fi
24937
24938
24939  windows_path="$new_path"
24940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24941    unix_path=`$CYGPATH -u "$windows_path"`
24942    new_path="$unix_path"
24943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24945    new_path="$unix_path"
24946  fi
24947
24948  if test "x$path" != "x$new_path"; then
24949    JAVA_HOME_PROCESSED="$new_path"
24950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24951$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24952  fi
24953
24954  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24955  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24956
24957    else
24958      # We're on a unix platform. Hooray! :)
24959      path="$JAVA_HOME_PROCESSED"
24960      has_space=`$ECHO "$path" | $GREP " "`
24961      if test "x$has_space" != x; then
24962        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24963$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24964        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24965      fi
24966
24967      # Use eval to expand a potential ~
24968      eval path="$path"
24969      if test ! -f "$path" && test ! -d "$path"; then
24970        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
24971      fi
24972
24973      if test -d "$path"; then
24974        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
24975      else
24976        dir="`$DIRNAME "$path"`"
24977        base="`$BASENAME "$path"`"
24978        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
24979      fi
24980    fi
24981  fi
24982
24983    if test ! -d "$JAVA_HOME_PROCESSED"; then
24984      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
24985$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
24986    else
24987      # Aha, the user has set a JAVA_HOME
24988      # let us use that as the Boot JDK.
24989      BOOT_JDK="$JAVA_HOME_PROCESSED"
24990      BOOT_JDK_FOUND=maybe
24991      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
24992$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
24993    fi
24994  fi
24995
24996
24997    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24998    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24999      # Do we have a bin/java?
25000      if test ! -x "$BOOT_JDK/bin/java"; then
25001        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25003        BOOT_JDK_FOUND=no
25004      else
25005        # Do we have a bin/javac?
25006        if test ! -x "$BOOT_JDK/bin/javac"; then
25007          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25009          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25010$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25011          BOOT_JDK_FOUND=no
25012        else
25013          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25014          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25015
25016          # Extra M4 quote needed to protect [] in grep expression.
25017          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25018          if test "x$FOUND_CORRECT_VERSION" = x; then
25019            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25021            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25022$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25023            BOOT_JDK_FOUND=no
25024          else
25025            # We're done! :-)
25026            BOOT_JDK_FOUND=yes
25027
25028  # Only process if variable expands to non-empty
25029
25030  if test "x$BOOT_JDK" != x; then
25031    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25032
25033  # Input might be given as Windows format, start by converting to
25034  # unix format.
25035  path="$BOOT_JDK"
25036  new_path=`$CYGPATH -u "$path"`
25037
25038  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25039  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25040  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25041  # "foo.exe" is OK but "foo" is an error.
25042  #
25043  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25044  # It is also a way to make sure we got the proper file name for the real test later on.
25045  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25046  if test "x$test_shortpath" = x; then
25047    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25048$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25049    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25050  fi
25051
25052  # Call helper function which possibly converts this using DOS-style short mode.
25053  # If so, the updated path is stored in $new_path.
25054
25055  input_path="$new_path"
25056  # Check if we need to convert this using DOS-style short mode. If the path
25057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25058  # take no chances and rewrite it.
25059  # Note: m4 eats our [], so we need to use [ and ] instead.
25060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25061  if test "x$has_forbidden_chars" != x; then
25062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25066      # Going to short mode and back again did indeed matter. Since short mode is
25067      # case insensitive, let's make it lowercase to improve readability.
25068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25069      # Now convert it back to Unix-style (cygpath)
25070      input_path=`$CYGPATH -u "$shortmode_path"`
25071      new_path="$input_path"
25072    fi
25073  fi
25074
25075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25076  if test "x$test_cygdrive_prefix" = x; then
25077    # As a simple fix, exclude /usr/bin since it's not a real path.
25078    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25080      # a path prefixed by /cygdrive for fixpath to work.
25081      new_path="$CYGWIN_ROOT_PATH$input_path"
25082    fi
25083  fi
25084
25085
25086  if test "x$path" != "x$new_path"; then
25087    BOOT_JDK="$new_path"
25088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25089$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25090  fi
25091
25092    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25093
25094  path="$BOOT_JDK"
25095  has_colon=`$ECHO $path | $GREP ^.:`
25096  new_path="$path"
25097  if test "x$has_colon" = x; then
25098    # Not in mixed or Windows style, start by that.
25099    new_path=`cmd //c echo $path`
25100  fi
25101
25102
25103  input_path="$new_path"
25104  # Check if we need to convert this using DOS-style short mode. If the path
25105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25106  # take no chances and rewrite it.
25107  # Note: m4 eats our [], so we need to use [ and ] instead.
25108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25109  if test "x$has_forbidden_chars" != x; then
25110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25111    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25112  fi
25113
25114
25115  windows_path="$new_path"
25116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25117    unix_path=`$CYGPATH -u "$windows_path"`
25118    new_path="$unix_path"
25119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25121    new_path="$unix_path"
25122  fi
25123
25124  if test "x$path" != "x$new_path"; then
25125    BOOT_JDK="$new_path"
25126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25127$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25128  fi
25129
25130  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25131  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25132
25133    else
25134      # We're on a unix platform. Hooray! :)
25135      path="$BOOT_JDK"
25136      has_space=`$ECHO "$path" | $GREP " "`
25137      if test "x$has_space" != x; then
25138        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25139$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25140        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25141      fi
25142
25143      # Use eval to expand a potential ~
25144      eval path="$path"
25145      if test ! -f "$path" && test ! -d "$path"; then
25146        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25147      fi
25148
25149      if test -d "$path"; then
25150        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25151      else
25152        dir="`$DIRNAME "$path"`"
25153        base="`$BASENAME "$path"`"
25154        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25155      fi
25156    fi
25157  fi
25158
25159            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25160$as_echo_n "checking for Boot JDK... " >&6; }
25161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25162$as_echo "$BOOT_JDK" >&6; }
25163            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25164$as_echo_n "checking Boot JDK version... " >&6; }
25165            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25167$as_echo "$BOOT_JDK_VERSION" >&6; }
25168          fi # end check jdk version
25169        fi # end check javac
25170      fi # end check java
25171    fi # end check boot jdk found
25172  fi
25173
25174
25175  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25176
25177  if test "x$BOOT_JDK_FOUND" = xno; then
25178    # Now execute the test
25179
25180  # Extract the first word of "javac", so it can be a program name with args.
25181set dummy javac; ac_word=$2
25182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25183$as_echo_n "checking for $ac_word... " >&6; }
25184if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25185  $as_echo_n "(cached) " >&6
25186else
25187  case $JAVAC_CHECK in
25188  [\\/]* | ?:[\\/]*)
25189  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25190  ;;
25191  *)
25192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25193for as_dir in $PATH
25194do
25195  IFS=$as_save_IFS
25196  test -z "$as_dir" && as_dir=.
25197    for ac_exec_ext in '' $ac_executable_extensions; do
25198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25199    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25201    break 2
25202  fi
25203done
25204  done
25205IFS=$as_save_IFS
25206
25207  ;;
25208esac
25209fi
25210JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25211if test -n "$JAVAC_CHECK"; then
25212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25213$as_echo "$JAVAC_CHECK" >&6; }
25214else
25215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25216$as_echo "no" >&6; }
25217fi
25218
25219
25220  # Extract the first word of "java", so it can be a program name with args.
25221set dummy java; ac_word=$2
25222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25223$as_echo_n "checking for $ac_word... " >&6; }
25224if ${ac_cv_path_JAVA_CHECK+:} false; then :
25225  $as_echo_n "(cached) " >&6
25226else
25227  case $JAVA_CHECK in
25228  [\\/]* | ?:[\\/]*)
25229  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25230  ;;
25231  *)
25232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25233for as_dir in $PATH
25234do
25235  IFS=$as_save_IFS
25236  test -z "$as_dir" && as_dir=.
25237    for ac_exec_ext in '' $ac_executable_extensions; do
25238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25239    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25241    break 2
25242  fi
25243done
25244  done
25245IFS=$as_save_IFS
25246
25247  ;;
25248esac
25249fi
25250JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25251if test -n "$JAVA_CHECK"; then
25252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25253$as_echo "$JAVA_CHECK" >&6; }
25254else
25255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25256$as_echo "no" >&6; }
25257fi
25258
25259
25260  BINARY="$JAVAC_CHECK"
25261  if test "x$JAVAC_CHECK" = x; then
25262    BINARY="$JAVA_CHECK"
25263  fi
25264  if test "x$BINARY" != x; then
25265    # So there is a java(c) binary, it might be part of a JDK.
25266    # Lets find the JDK/JRE directory by following symbolic links.
25267    # Linux/GNU systems often have links from /usr/bin/java to
25268    # /etc/alternatives/java to the real JDK binary.
25269
25270  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25271    # Follow a chain of symbolic links. Use readlink
25272    # where it exists, else fall back to horribly
25273    # complicated shell code.
25274    if test "x$READLINK_TESTED" != yes; then
25275      # On MacOSX there is a readlink tool with a different
25276      # purpose than the GNU readlink tool. Check the found readlink.
25277      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25278      if test "x$ISGNU" = x; then
25279        # A readlink that we do not know how to use.
25280        # Are there other non-GNU readlinks out there?
25281        READLINK_TESTED=yes
25282        READLINK=
25283      fi
25284    fi
25285
25286    if test "x$READLINK" != x; then
25287      BINARY=`$READLINK -f $BINARY`
25288    else
25289      # Save the current directory for restoring afterwards
25290      STARTDIR=$PWD
25291      COUNTER=0
25292      sym_link_dir=`$DIRNAME $BINARY`
25293      sym_link_file=`$BASENAME $BINARY`
25294      cd $sym_link_dir
25295      # Use -P flag to resolve symlinks in directories.
25296      cd `$THEPWDCMD -P`
25297      sym_link_dir=`$THEPWDCMD -P`
25298      # Resolve file symlinks
25299      while test $COUNTER -lt 20; do
25300        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25301        if test "x$ISLINK" == x; then
25302          # This is not a symbolic link! We are done!
25303          break
25304        fi
25305        # Again resolve directory symlinks since the target of the just found
25306        # link could be in a different directory
25307        cd `$DIRNAME $ISLINK`
25308        sym_link_dir=`$THEPWDCMD -P`
25309        sym_link_file=`$BASENAME $ISLINK`
25310        let COUNTER=COUNTER+1
25311      done
25312      cd $STARTDIR
25313      BINARY=$sym_link_dir/$sym_link_file
25314    fi
25315  fi
25316
25317    BOOT_JDK=`dirname "$BINARY"`
25318    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25319    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25320      # Looks like we found ourselves an JDK
25321      BOOT_JDK_FOUND=maybe
25322      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25323$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25324    fi
25325  fi
25326
25327
25328    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25329    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25330      # Do we have a bin/java?
25331      if test ! -x "$BOOT_JDK/bin/java"; then
25332        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25334        BOOT_JDK_FOUND=no
25335      else
25336        # Do we have a bin/javac?
25337        if test ! -x "$BOOT_JDK/bin/javac"; then
25338          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25340          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25341$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25342          BOOT_JDK_FOUND=no
25343        else
25344          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25345          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25346
25347          # Extra M4 quote needed to protect [] in grep expression.
25348          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25349          if test "x$FOUND_CORRECT_VERSION" = x; then
25350            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25351$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25352            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25353$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25354            BOOT_JDK_FOUND=no
25355          else
25356            # We're done! :-)
25357            BOOT_JDK_FOUND=yes
25358
25359  # Only process if variable expands to non-empty
25360
25361  if test "x$BOOT_JDK" != x; then
25362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25363
25364  # Input might be given as Windows format, start by converting to
25365  # unix format.
25366  path="$BOOT_JDK"
25367  new_path=`$CYGPATH -u "$path"`
25368
25369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25372  # "foo.exe" is OK but "foo" is an error.
25373  #
25374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25375  # It is also a way to make sure we got the proper file name for the real test later on.
25376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25377  if test "x$test_shortpath" = x; then
25378    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25379$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25380    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25381  fi
25382
25383  # Call helper function which possibly converts this using DOS-style short mode.
25384  # If so, the updated path is stored in $new_path.
25385
25386  input_path="$new_path"
25387  # Check if we need to convert this using DOS-style short mode. If the path
25388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25389  # take no chances and rewrite it.
25390  # Note: m4 eats our [], so we need to use [ and ] instead.
25391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25392  if test "x$has_forbidden_chars" != x; then
25393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25397      # Going to short mode and back again did indeed matter. Since short mode is
25398      # case insensitive, let's make it lowercase to improve readability.
25399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25400      # Now convert it back to Unix-style (cygpath)
25401      input_path=`$CYGPATH -u "$shortmode_path"`
25402      new_path="$input_path"
25403    fi
25404  fi
25405
25406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25407  if test "x$test_cygdrive_prefix" = x; then
25408    # As a simple fix, exclude /usr/bin since it's not a real path.
25409    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25411      # a path prefixed by /cygdrive for fixpath to work.
25412      new_path="$CYGWIN_ROOT_PATH$input_path"
25413    fi
25414  fi
25415
25416
25417  if test "x$path" != "x$new_path"; then
25418    BOOT_JDK="$new_path"
25419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25420$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25421  fi
25422
25423    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25424
25425  path="$BOOT_JDK"
25426  has_colon=`$ECHO $path | $GREP ^.:`
25427  new_path="$path"
25428  if test "x$has_colon" = x; then
25429    # Not in mixed or Windows style, start by that.
25430    new_path=`cmd //c echo $path`
25431  fi
25432
25433
25434  input_path="$new_path"
25435  # Check if we need to convert this using DOS-style short mode. If the path
25436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25437  # take no chances and rewrite it.
25438  # Note: m4 eats our [], so we need to use [ and ] instead.
25439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25440  if test "x$has_forbidden_chars" != x; then
25441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25443  fi
25444
25445
25446  windows_path="$new_path"
25447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25448    unix_path=`$CYGPATH -u "$windows_path"`
25449    new_path="$unix_path"
25450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25452    new_path="$unix_path"
25453  fi
25454
25455  if test "x$path" != "x$new_path"; then
25456    BOOT_JDK="$new_path"
25457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25459  fi
25460
25461  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25462  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25463
25464    else
25465      # We're on a unix platform. Hooray! :)
25466      path="$BOOT_JDK"
25467      has_space=`$ECHO "$path" | $GREP " "`
25468      if test "x$has_space" != x; then
25469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25470$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25471        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25472      fi
25473
25474      # Use eval to expand a potential ~
25475      eval path="$path"
25476      if test ! -f "$path" && test ! -d "$path"; then
25477        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25478      fi
25479
25480      if test -d "$path"; then
25481        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25482      else
25483        dir="`$DIRNAME "$path"`"
25484        base="`$BASENAME "$path"`"
25485        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25486      fi
25487    fi
25488  fi
25489
25490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25491$as_echo_n "checking for Boot JDK... " >&6; }
25492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25493$as_echo "$BOOT_JDK" >&6; }
25494            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25495$as_echo_n "checking Boot JDK version... " >&6; }
25496            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25498$as_echo "$BOOT_JDK_VERSION" >&6; }
25499          fi # end check jdk version
25500        fi # end check javac
25501      fi # end check java
25502    fi # end check boot jdk found
25503  fi
25504
25505
25506  # Test: Is there a JDK installed in default, well-known locations?
25507
25508  if test "x$BOOT_JDK_FOUND" = xno; then
25509    # Now execute the test
25510
25511  if test "x$OPENJDK_TARGET_OS" = xwindows; then
25512
25513  if test "x$BOOT_JDK_FOUND" = xno; then
25514    # Now execute the test
25515
25516  if test "x$ProgramW6432" != x; then
25517    VIRTUAL_DIR="$ProgramW6432/Java"
25518
25519  windows_path="$VIRTUAL_DIR"
25520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25521    unix_path=`$CYGPATH -u "$windows_path"`
25522    VIRTUAL_DIR="$unix_path"
25523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25525    VIRTUAL_DIR="$unix_path"
25526  fi
25527
25528
25529  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25530  BOOT_JDK_SUFFIX=""
25531  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25532  if test "x$ALL_JDKS_FOUND" != x; then
25533    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25534
25535  if test "x$BOOT_JDK_FOUND" = xno; then
25536    # Now execute the test
25537
25538        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25539        if test -d "$BOOT_JDK"; then
25540          BOOT_JDK_FOUND=maybe
25541          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25542$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25543        fi
25544
25545
25546    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25547    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25548      # Do we have a bin/java?
25549      if test ! -x "$BOOT_JDK/bin/java"; then
25550        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25552        BOOT_JDK_FOUND=no
25553      else
25554        # Do we have a bin/javac?
25555        if test ! -x "$BOOT_JDK/bin/javac"; then
25556          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25557$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25558          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25559$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25560          BOOT_JDK_FOUND=no
25561        else
25562          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25563          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25564
25565          # Extra M4 quote needed to protect [] in grep expression.
25566          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25567          if test "x$FOUND_CORRECT_VERSION" = x; then
25568            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25570            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25571$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25572            BOOT_JDK_FOUND=no
25573          else
25574            # We're done! :-)
25575            BOOT_JDK_FOUND=yes
25576
25577  # Only process if variable expands to non-empty
25578
25579  if test "x$BOOT_JDK" != x; then
25580    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25581
25582  # Input might be given as Windows format, start by converting to
25583  # unix format.
25584  path="$BOOT_JDK"
25585  new_path=`$CYGPATH -u "$path"`
25586
25587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25590  # "foo.exe" is OK but "foo" is an error.
25591  #
25592  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25593  # It is also a way to make sure we got the proper file name for the real test later on.
25594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25595  if test "x$test_shortpath" = x; then
25596    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25597$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25598    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25599  fi
25600
25601  # Call helper function which possibly converts this using DOS-style short mode.
25602  # If so, the updated path is stored in $new_path.
25603
25604  input_path="$new_path"
25605  # Check if we need to convert this using DOS-style short mode. If the path
25606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25607  # take no chances and rewrite it.
25608  # Note: m4 eats our [], so we need to use [ and ] instead.
25609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25610  if test "x$has_forbidden_chars" != x; then
25611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25615      # Going to short mode and back again did indeed matter. Since short mode is
25616      # case insensitive, let's make it lowercase to improve readability.
25617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25618      # Now convert it back to Unix-style (cygpath)
25619      input_path=`$CYGPATH -u "$shortmode_path"`
25620      new_path="$input_path"
25621    fi
25622  fi
25623
25624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25625  if test "x$test_cygdrive_prefix" = x; then
25626    # As a simple fix, exclude /usr/bin since it's not a real path.
25627    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25629      # a path prefixed by /cygdrive for fixpath to work.
25630      new_path="$CYGWIN_ROOT_PATH$input_path"
25631    fi
25632  fi
25633
25634
25635  if test "x$path" != "x$new_path"; then
25636    BOOT_JDK="$new_path"
25637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25638$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25639  fi
25640
25641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25642
25643  path="$BOOT_JDK"
25644  has_colon=`$ECHO $path | $GREP ^.:`
25645  new_path="$path"
25646  if test "x$has_colon" = x; then
25647    # Not in mixed or Windows style, start by that.
25648    new_path=`cmd //c echo $path`
25649  fi
25650
25651
25652  input_path="$new_path"
25653  # Check if we need to convert this using DOS-style short mode. If the path
25654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25655  # take no chances and rewrite it.
25656  # Note: m4 eats our [], so we need to use [ and ] instead.
25657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25658  if test "x$has_forbidden_chars" != x; then
25659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25661  fi
25662
25663
25664  windows_path="$new_path"
25665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25666    unix_path=`$CYGPATH -u "$windows_path"`
25667    new_path="$unix_path"
25668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25670    new_path="$unix_path"
25671  fi
25672
25673  if test "x$path" != "x$new_path"; then
25674    BOOT_JDK="$new_path"
25675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25676$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25677  fi
25678
25679  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25680  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25681
25682    else
25683      # We're on a unix platform. Hooray! :)
25684      path="$BOOT_JDK"
25685      has_space=`$ECHO "$path" | $GREP " "`
25686      if test "x$has_space" != x; then
25687        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25689        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25690      fi
25691
25692      # Use eval to expand a potential ~
25693      eval path="$path"
25694      if test ! -f "$path" && test ! -d "$path"; then
25695        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25696      fi
25697
25698      if test -d "$path"; then
25699        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25700      else
25701        dir="`$DIRNAME "$path"`"
25702        base="`$BASENAME "$path"`"
25703        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25704      fi
25705    fi
25706  fi
25707
25708            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25709$as_echo_n "checking for Boot JDK... " >&6; }
25710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25711$as_echo "$BOOT_JDK" >&6; }
25712            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25713$as_echo_n "checking Boot JDK version... " >&6; }
25714            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25715            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25716$as_echo "$BOOT_JDK_VERSION" >&6; }
25717          fi # end check jdk version
25718        fi # end check javac
25719      fi # end check java
25720    fi # end check boot jdk found
25721  fi
25722
25723    done
25724  fi
25725
25726  fi
25727
25728
25729    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25730    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25731      # Do we have a bin/java?
25732      if test ! -x "$BOOT_JDK/bin/java"; then
25733        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25734$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25735        BOOT_JDK_FOUND=no
25736      else
25737        # Do we have a bin/javac?
25738        if test ! -x "$BOOT_JDK/bin/javac"; then
25739          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25740$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25741          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25742$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25743          BOOT_JDK_FOUND=no
25744        else
25745          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25746          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25747
25748          # Extra M4 quote needed to protect [] in grep expression.
25749          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25750          if test "x$FOUND_CORRECT_VERSION" = x; then
25751            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25753            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25754$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25755            BOOT_JDK_FOUND=no
25756          else
25757            # We're done! :-)
25758            BOOT_JDK_FOUND=yes
25759
25760  # Only process if variable expands to non-empty
25761
25762  if test "x$BOOT_JDK" != x; then
25763    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25764
25765  # Input might be given as Windows format, start by converting to
25766  # unix format.
25767  path="$BOOT_JDK"
25768  new_path=`$CYGPATH -u "$path"`
25769
25770  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25771  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25772  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25773  # "foo.exe" is OK but "foo" is an error.
25774  #
25775  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25776  # It is also a way to make sure we got the proper file name for the real test later on.
25777  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25778  if test "x$test_shortpath" = x; then
25779    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25780$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25781    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25782  fi
25783
25784  # Call helper function which possibly converts this using DOS-style short mode.
25785  # If so, the updated path is stored in $new_path.
25786
25787  input_path="$new_path"
25788  # Check if we need to convert this using DOS-style short mode. If the path
25789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25790  # take no chances and rewrite it.
25791  # Note: m4 eats our [], so we need to use [ and ] instead.
25792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25793  if test "x$has_forbidden_chars" != x; then
25794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25798      # Going to short mode and back again did indeed matter. Since short mode is
25799      # case insensitive, let's make it lowercase to improve readability.
25800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25801      # Now convert it back to Unix-style (cygpath)
25802      input_path=`$CYGPATH -u "$shortmode_path"`
25803      new_path="$input_path"
25804    fi
25805  fi
25806
25807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25808  if test "x$test_cygdrive_prefix" = x; then
25809    # As a simple fix, exclude /usr/bin since it's not a real path.
25810    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25812      # a path prefixed by /cygdrive for fixpath to work.
25813      new_path="$CYGWIN_ROOT_PATH$input_path"
25814    fi
25815  fi
25816
25817
25818  if test "x$path" != "x$new_path"; then
25819    BOOT_JDK="$new_path"
25820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25821$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25822  fi
25823
25824    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25825
25826  path="$BOOT_JDK"
25827  has_colon=`$ECHO $path | $GREP ^.:`
25828  new_path="$path"
25829  if test "x$has_colon" = x; then
25830    # Not in mixed or Windows style, start by that.
25831    new_path=`cmd //c echo $path`
25832  fi
25833
25834
25835  input_path="$new_path"
25836  # Check if we need to convert this using DOS-style short mode. If the path
25837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25838  # take no chances and rewrite it.
25839  # Note: m4 eats our [], so we need to use [ and ] instead.
25840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25841  if test "x$has_forbidden_chars" != x; then
25842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25843    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25844  fi
25845
25846
25847  windows_path="$new_path"
25848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25849    unix_path=`$CYGPATH -u "$windows_path"`
25850    new_path="$unix_path"
25851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25853    new_path="$unix_path"
25854  fi
25855
25856  if test "x$path" != "x$new_path"; then
25857    BOOT_JDK="$new_path"
25858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25859$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25860  fi
25861
25862  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25863  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25864
25865    else
25866      # We're on a unix platform. Hooray! :)
25867      path="$BOOT_JDK"
25868      has_space=`$ECHO "$path" | $GREP " "`
25869      if test "x$has_space" != x; then
25870        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25871$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25872        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25873      fi
25874
25875      # Use eval to expand a potential ~
25876      eval path="$path"
25877      if test ! -f "$path" && test ! -d "$path"; then
25878        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25879      fi
25880
25881      if test -d "$path"; then
25882        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25883      else
25884        dir="`$DIRNAME "$path"`"
25885        base="`$BASENAME "$path"`"
25886        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25887      fi
25888    fi
25889  fi
25890
25891            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25892$as_echo_n "checking for Boot JDK... " >&6; }
25893            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25894$as_echo "$BOOT_JDK" >&6; }
25895            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25896$as_echo_n "checking Boot JDK version... " >&6; }
25897            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25898            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25899$as_echo "$BOOT_JDK_VERSION" >&6; }
25900          fi # end check jdk version
25901        fi # end check javac
25902      fi # end check java
25903    fi # end check boot jdk found
25904  fi
25905
25906
25907  if test "x$BOOT_JDK_FOUND" = xno; then
25908    # Now execute the test
25909
25910  if test "x$PROGRAMW6432" != x; then
25911    VIRTUAL_DIR="$PROGRAMW6432/Java"
25912
25913  windows_path="$VIRTUAL_DIR"
25914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25915    unix_path=`$CYGPATH -u "$windows_path"`
25916    VIRTUAL_DIR="$unix_path"
25917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25919    VIRTUAL_DIR="$unix_path"
25920  fi
25921
25922
25923  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25924  BOOT_JDK_SUFFIX=""
25925  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25926  if test "x$ALL_JDKS_FOUND" != x; then
25927    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25928
25929  if test "x$BOOT_JDK_FOUND" = xno; then
25930    # Now execute the test
25931
25932        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25933        if test -d "$BOOT_JDK"; then
25934          BOOT_JDK_FOUND=maybe
25935          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25936$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25937        fi
25938
25939
25940    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25941    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25942      # Do we have a bin/java?
25943      if test ! -x "$BOOT_JDK/bin/java"; then
25944        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25945$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25946        BOOT_JDK_FOUND=no
25947      else
25948        # Do we have a bin/javac?
25949        if test ! -x "$BOOT_JDK/bin/javac"; then
25950          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25952          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25953$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25954          BOOT_JDK_FOUND=no
25955        else
25956          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25957          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25958
25959          # Extra M4 quote needed to protect [] in grep expression.
25960          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25961          if test "x$FOUND_CORRECT_VERSION" = x; then
25962            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25964            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25965$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25966            BOOT_JDK_FOUND=no
25967          else
25968            # We're done! :-)
25969            BOOT_JDK_FOUND=yes
25970
25971  # Only process if variable expands to non-empty
25972
25973  if test "x$BOOT_JDK" != x; then
25974    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25975
25976  # Input might be given as Windows format, start by converting to
25977  # unix format.
25978  path="$BOOT_JDK"
25979  new_path=`$CYGPATH -u "$path"`
25980
25981  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25982  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25983  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25984  # "foo.exe" is OK but "foo" is an error.
25985  #
25986  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25987  # It is also a way to make sure we got the proper file name for the real test later on.
25988  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25989  if test "x$test_shortpath" = x; then
25990    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25991$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25992    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25993  fi
25994
25995  # Call helper function which possibly converts this using DOS-style short mode.
25996  # If so, the updated path is stored in $new_path.
25997
25998  input_path="$new_path"
25999  # Check if we need to convert this using DOS-style short mode. If the path
26000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26001  # take no chances and rewrite it.
26002  # Note: m4 eats our [], so we need to use [ and ] instead.
26003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26004  if test "x$has_forbidden_chars" != x; then
26005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26006    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26007    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26008    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26009      # Going to short mode and back again did indeed matter. Since short mode is
26010      # case insensitive, let's make it lowercase to improve readability.
26011      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26012      # Now convert it back to Unix-style (cygpath)
26013      input_path=`$CYGPATH -u "$shortmode_path"`
26014      new_path="$input_path"
26015    fi
26016  fi
26017
26018  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26019  if test "x$test_cygdrive_prefix" = x; then
26020    # As a simple fix, exclude /usr/bin since it's not a real path.
26021    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26022      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26023      # a path prefixed by /cygdrive for fixpath to work.
26024      new_path="$CYGWIN_ROOT_PATH$input_path"
26025    fi
26026  fi
26027
26028
26029  if test "x$path" != "x$new_path"; then
26030    BOOT_JDK="$new_path"
26031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26032$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26033  fi
26034
26035    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26036
26037  path="$BOOT_JDK"
26038  has_colon=`$ECHO $path | $GREP ^.:`
26039  new_path="$path"
26040  if test "x$has_colon" = x; then
26041    # Not in mixed or Windows style, start by that.
26042    new_path=`cmd //c echo $path`
26043  fi
26044
26045
26046  input_path="$new_path"
26047  # Check if we need to convert this using DOS-style short mode. If the path
26048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26049  # take no chances and rewrite it.
26050  # Note: m4 eats our [], so we need to use [ and ] instead.
26051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26052  if test "x$has_forbidden_chars" != x; then
26053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26054    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26055  fi
26056
26057
26058  windows_path="$new_path"
26059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26060    unix_path=`$CYGPATH -u "$windows_path"`
26061    new_path="$unix_path"
26062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26064    new_path="$unix_path"
26065  fi
26066
26067  if test "x$path" != "x$new_path"; then
26068    BOOT_JDK="$new_path"
26069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26070$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26071  fi
26072
26073  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26074  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26075
26076    else
26077      # We're on a unix platform. Hooray! :)
26078      path="$BOOT_JDK"
26079      has_space=`$ECHO "$path" | $GREP " "`
26080      if test "x$has_space" != x; then
26081        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26082$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26083        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26084      fi
26085
26086      # Use eval to expand a potential ~
26087      eval path="$path"
26088      if test ! -f "$path" && test ! -d "$path"; then
26089        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26090      fi
26091
26092      if test -d "$path"; then
26093        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26094      else
26095        dir="`$DIRNAME "$path"`"
26096        base="`$BASENAME "$path"`"
26097        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26098      fi
26099    fi
26100  fi
26101
26102            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26103$as_echo_n "checking for Boot JDK... " >&6; }
26104            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26105$as_echo "$BOOT_JDK" >&6; }
26106            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26107$as_echo_n "checking Boot JDK version... " >&6; }
26108            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26110$as_echo "$BOOT_JDK_VERSION" >&6; }
26111          fi # end check jdk version
26112        fi # end check javac
26113      fi # end check java
26114    fi # end check boot jdk found
26115  fi
26116
26117    done
26118  fi
26119
26120  fi
26121
26122
26123    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26124    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26125      # Do we have a bin/java?
26126      if test ! -x "$BOOT_JDK/bin/java"; then
26127        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26128$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26129        BOOT_JDK_FOUND=no
26130      else
26131        # Do we have a bin/javac?
26132        if test ! -x "$BOOT_JDK/bin/javac"; then
26133          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26135          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26136$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26137          BOOT_JDK_FOUND=no
26138        else
26139          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26140          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26141
26142          # Extra M4 quote needed to protect [] in grep expression.
26143          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26144          if test "x$FOUND_CORRECT_VERSION" = x; then
26145            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26147            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26148$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26149            BOOT_JDK_FOUND=no
26150          else
26151            # We're done! :-)
26152            BOOT_JDK_FOUND=yes
26153
26154  # Only process if variable expands to non-empty
26155
26156  if test "x$BOOT_JDK" != x; then
26157    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26158
26159  # Input might be given as Windows format, start by converting to
26160  # unix format.
26161  path="$BOOT_JDK"
26162  new_path=`$CYGPATH -u "$path"`
26163
26164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26167  # "foo.exe" is OK but "foo" is an error.
26168  #
26169  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26170  # It is also a way to make sure we got the proper file name for the real test later on.
26171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26172  if test "x$test_shortpath" = x; then
26173    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26174$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26175    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26176  fi
26177
26178  # Call helper function which possibly converts this using DOS-style short mode.
26179  # If so, the updated path is stored in $new_path.
26180
26181  input_path="$new_path"
26182  # Check if we need to convert this using DOS-style short mode. If the path
26183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26184  # take no chances and rewrite it.
26185  # Note: m4 eats our [], so we need to use [ and ] instead.
26186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26187  if test "x$has_forbidden_chars" != x; then
26188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26189    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26190    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26191    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26192      # Going to short mode and back again did indeed matter. Since short mode is
26193      # case insensitive, let's make it lowercase to improve readability.
26194      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26195      # Now convert it back to Unix-style (cygpath)
26196      input_path=`$CYGPATH -u "$shortmode_path"`
26197      new_path="$input_path"
26198    fi
26199  fi
26200
26201  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26202  if test "x$test_cygdrive_prefix" = x; then
26203    # As a simple fix, exclude /usr/bin since it's not a real path.
26204    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26205      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26206      # a path prefixed by /cygdrive for fixpath to work.
26207      new_path="$CYGWIN_ROOT_PATH$input_path"
26208    fi
26209  fi
26210
26211
26212  if test "x$path" != "x$new_path"; then
26213    BOOT_JDK="$new_path"
26214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26215$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26216  fi
26217
26218    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26219
26220  path="$BOOT_JDK"
26221  has_colon=`$ECHO $path | $GREP ^.:`
26222  new_path="$path"
26223  if test "x$has_colon" = x; then
26224    # Not in mixed or Windows style, start by that.
26225    new_path=`cmd //c echo $path`
26226  fi
26227
26228
26229  input_path="$new_path"
26230  # Check if we need to convert this using DOS-style short mode. If the path
26231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26232  # take no chances and rewrite it.
26233  # Note: m4 eats our [], so we need to use [ and ] instead.
26234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26235  if test "x$has_forbidden_chars" != x; then
26236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26238  fi
26239
26240
26241  windows_path="$new_path"
26242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26243    unix_path=`$CYGPATH -u "$windows_path"`
26244    new_path="$unix_path"
26245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26247    new_path="$unix_path"
26248  fi
26249
26250  if test "x$path" != "x$new_path"; then
26251    BOOT_JDK="$new_path"
26252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26253$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26254  fi
26255
26256  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26257  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26258
26259    else
26260      # We're on a unix platform. Hooray! :)
26261      path="$BOOT_JDK"
26262      has_space=`$ECHO "$path" | $GREP " "`
26263      if test "x$has_space" != x; then
26264        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26265$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26266        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26267      fi
26268
26269      # Use eval to expand a potential ~
26270      eval path="$path"
26271      if test ! -f "$path" && test ! -d "$path"; then
26272        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26273      fi
26274
26275      if test -d "$path"; then
26276        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26277      else
26278        dir="`$DIRNAME "$path"`"
26279        base="`$BASENAME "$path"`"
26280        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26281      fi
26282    fi
26283  fi
26284
26285            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26286$as_echo_n "checking for Boot JDK... " >&6; }
26287            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26288$as_echo "$BOOT_JDK" >&6; }
26289            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26290$as_echo_n "checking Boot JDK version... " >&6; }
26291            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26293$as_echo "$BOOT_JDK_VERSION" >&6; }
26294          fi # end check jdk version
26295        fi # end check javac
26296      fi # end check java
26297    fi # end check boot jdk found
26298  fi
26299
26300
26301  if test "x$BOOT_JDK_FOUND" = xno; then
26302    # Now execute the test
26303
26304  if test "x$PROGRAMFILES" != x; then
26305    VIRTUAL_DIR="$PROGRAMFILES/Java"
26306
26307  windows_path="$VIRTUAL_DIR"
26308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26309    unix_path=`$CYGPATH -u "$windows_path"`
26310    VIRTUAL_DIR="$unix_path"
26311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26313    VIRTUAL_DIR="$unix_path"
26314  fi
26315
26316
26317  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26318  BOOT_JDK_SUFFIX=""
26319  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26320  if test "x$ALL_JDKS_FOUND" != x; then
26321    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26322
26323  if test "x$BOOT_JDK_FOUND" = xno; then
26324    # Now execute the test
26325
26326        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26327        if test -d "$BOOT_JDK"; then
26328          BOOT_JDK_FOUND=maybe
26329          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26330$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26331        fi
26332
26333
26334    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26335    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26336      # Do we have a bin/java?
26337      if test ! -x "$BOOT_JDK/bin/java"; then
26338        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26340        BOOT_JDK_FOUND=no
26341      else
26342        # Do we have a bin/javac?
26343        if test ! -x "$BOOT_JDK/bin/javac"; then
26344          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26345$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26346          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26347$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26348          BOOT_JDK_FOUND=no
26349        else
26350          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26351          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26352
26353          # Extra M4 quote needed to protect [] in grep expression.
26354          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26355          if test "x$FOUND_CORRECT_VERSION" = x; then
26356            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26357$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26358            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26359$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26360            BOOT_JDK_FOUND=no
26361          else
26362            # We're done! :-)
26363            BOOT_JDK_FOUND=yes
26364
26365  # Only process if variable expands to non-empty
26366
26367  if test "x$BOOT_JDK" != x; then
26368    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26369
26370  # Input might be given as Windows format, start by converting to
26371  # unix format.
26372  path="$BOOT_JDK"
26373  new_path=`$CYGPATH -u "$path"`
26374
26375  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26376  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26377  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26378  # "foo.exe" is OK but "foo" is an error.
26379  #
26380  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26381  # It is also a way to make sure we got the proper file name for the real test later on.
26382  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26383  if test "x$test_shortpath" = x; then
26384    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26385$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26386    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26387  fi
26388
26389  # Call helper function which possibly converts this using DOS-style short mode.
26390  # If so, the updated path is stored in $new_path.
26391
26392  input_path="$new_path"
26393  # Check if we need to convert this using DOS-style short mode. If the path
26394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26395  # take no chances and rewrite it.
26396  # Note: m4 eats our [], so we need to use [ and ] instead.
26397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26398  if test "x$has_forbidden_chars" != x; then
26399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26400    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26401    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26402    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26403      # Going to short mode and back again did indeed matter. Since short mode is
26404      # case insensitive, let's make it lowercase to improve readability.
26405      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26406      # Now convert it back to Unix-style (cygpath)
26407      input_path=`$CYGPATH -u "$shortmode_path"`
26408      new_path="$input_path"
26409    fi
26410  fi
26411
26412  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26413  if test "x$test_cygdrive_prefix" = x; then
26414    # As a simple fix, exclude /usr/bin since it's not a real path.
26415    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26416      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26417      # a path prefixed by /cygdrive for fixpath to work.
26418      new_path="$CYGWIN_ROOT_PATH$input_path"
26419    fi
26420  fi
26421
26422
26423  if test "x$path" != "x$new_path"; then
26424    BOOT_JDK="$new_path"
26425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26426$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26427  fi
26428
26429    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26430
26431  path="$BOOT_JDK"
26432  has_colon=`$ECHO $path | $GREP ^.:`
26433  new_path="$path"
26434  if test "x$has_colon" = x; then
26435    # Not in mixed or Windows style, start by that.
26436    new_path=`cmd //c echo $path`
26437  fi
26438
26439
26440  input_path="$new_path"
26441  # Check if we need to convert this using DOS-style short mode. If the path
26442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26443  # take no chances and rewrite it.
26444  # Note: m4 eats our [], so we need to use [ and ] instead.
26445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26446  if test "x$has_forbidden_chars" != x; then
26447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26449  fi
26450
26451
26452  windows_path="$new_path"
26453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26454    unix_path=`$CYGPATH -u "$windows_path"`
26455    new_path="$unix_path"
26456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26458    new_path="$unix_path"
26459  fi
26460
26461  if test "x$path" != "x$new_path"; then
26462    BOOT_JDK="$new_path"
26463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26464$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26465  fi
26466
26467  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26468  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26469
26470    else
26471      # We're on a unix platform. Hooray! :)
26472      path="$BOOT_JDK"
26473      has_space=`$ECHO "$path" | $GREP " "`
26474      if test "x$has_space" != x; then
26475        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26476$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26477        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26478      fi
26479
26480      # Use eval to expand a potential ~
26481      eval path="$path"
26482      if test ! -f "$path" && test ! -d "$path"; then
26483        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26484      fi
26485
26486      if test -d "$path"; then
26487        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26488      else
26489        dir="`$DIRNAME "$path"`"
26490        base="`$BASENAME "$path"`"
26491        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26492      fi
26493    fi
26494  fi
26495
26496            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26497$as_echo_n "checking for Boot JDK... " >&6; }
26498            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26499$as_echo "$BOOT_JDK" >&6; }
26500            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26501$as_echo_n "checking Boot JDK version... " >&6; }
26502            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26503            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26504$as_echo "$BOOT_JDK_VERSION" >&6; }
26505          fi # end check jdk version
26506        fi # end check javac
26507      fi # end check java
26508    fi # end check boot jdk found
26509  fi
26510
26511    done
26512  fi
26513
26514  fi
26515
26516
26517    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26518    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26519      # Do we have a bin/java?
26520      if test ! -x "$BOOT_JDK/bin/java"; then
26521        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26523        BOOT_JDK_FOUND=no
26524      else
26525        # Do we have a bin/javac?
26526        if test ! -x "$BOOT_JDK/bin/javac"; then
26527          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26529          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26530$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26531          BOOT_JDK_FOUND=no
26532        else
26533          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26534          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26535
26536          # Extra M4 quote needed to protect [] in grep expression.
26537          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26538          if test "x$FOUND_CORRECT_VERSION" = x; then
26539            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26540$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26541            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26542$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26543            BOOT_JDK_FOUND=no
26544          else
26545            # We're done! :-)
26546            BOOT_JDK_FOUND=yes
26547
26548  # Only process if variable expands to non-empty
26549
26550  if test "x$BOOT_JDK" != x; then
26551    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26552
26553  # Input might be given as Windows format, start by converting to
26554  # unix format.
26555  path="$BOOT_JDK"
26556  new_path=`$CYGPATH -u "$path"`
26557
26558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26561  # "foo.exe" is OK but "foo" is an error.
26562  #
26563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26564  # It is also a way to make sure we got the proper file name for the real test later on.
26565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26566  if test "x$test_shortpath" = x; then
26567    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26568$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26569    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26570  fi
26571
26572  # Call helper function which possibly converts this using DOS-style short mode.
26573  # If so, the updated path is stored in $new_path.
26574
26575  input_path="$new_path"
26576  # Check if we need to convert this using DOS-style short mode. If the path
26577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26578  # take no chances and rewrite it.
26579  # Note: m4 eats our [], so we need to use [ and ] instead.
26580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26581  if test "x$has_forbidden_chars" != x; then
26582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26586      # Going to short mode and back again did indeed matter. Since short mode is
26587      # case insensitive, let's make it lowercase to improve readability.
26588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26589      # Now convert it back to Unix-style (cygpath)
26590      input_path=`$CYGPATH -u "$shortmode_path"`
26591      new_path="$input_path"
26592    fi
26593  fi
26594
26595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26596  if test "x$test_cygdrive_prefix" = x; then
26597    # As a simple fix, exclude /usr/bin since it's not a real path.
26598    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26600      # a path prefixed by /cygdrive for fixpath to work.
26601      new_path="$CYGWIN_ROOT_PATH$input_path"
26602    fi
26603  fi
26604
26605
26606  if test "x$path" != "x$new_path"; then
26607    BOOT_JDK="$new_path"
26608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26609$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26610  fi
26611
26612    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26613
26614  path="$BOOT_JDK"
26615  has_colon=`$ECHO $path | $GREP ^.:`
26616  new_path="$path"
26617  if test "x$has_colon" = x; then
26618    # Not in mixed or Windows style, start by that.
26619    new_path=`cmd //c echo $path`
26620  fi
26621
26622
26623  input_path="$new_path"
26624  # Check if we need to convert this using DOS-style short mode. If the path
26625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26626  # take no chances and rewrite it.
26627  # Note: m4 eats our [], so we need to use [ and ] instead.
26628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26629  if test "x$has_forbidden_chars" != x; then
26630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26632  fi
26633
26634
26635  windows_path="$new_path"
26636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26637    unix_path=`$CYGPATH -u "$windows_path"`
26638    new_path="$unix_path"
26639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26641    new_path="$unix_path"
26642  fi
26643
26644  if test "x$path" != "x$new_path"; then
26645    BOOT_JDK="$new_path"
26646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26647$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26648  fi
26649
26650  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26651  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26652
26653    else
26654      # We're on a unix platform. Hooray! :)
26655      path="$BOOT_JDK"
26656      has_space=`$ECHO "$path" | $GREP " "`
26657      if test "x$has_space" != x; then
26658        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26659$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26660        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26661      fi
26662
26663      # Use eval to expand a potential ~
26664      eval path="$path"
26665      if test ! -f "$path" && test ! -d "$path"; then
26666        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26667      fi
26668
26669      if test -d "$path"; then
26670        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26671      else
26672        dir="`$DIRNAME "$path"`"
26673        base="`$BASENAME "$path"`"
26674        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26675      fi
26676    fi
26677  fi
26678
26679            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26680$as_echo_n "checking for Boot JDK... " >&6; }
26681            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26682$as_echo "$BOOT_JDK" >&6; }
26683            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26684$as_echo_n "checking Boot JDK version... " >&6; }
26685            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26686            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26687$as_echo "$BOOT_JDK_VERSION" >&6; }
26688          fi # end check jdk version
26689        fi # end check javac
26690      fi # end check java
26691    fi # end check boot jdk found
26692  fi
26693
26694
26695  if test "x$BOOT_JDK_FOUND" = xno; then
26696    # Now execute the test
26697
26698  if test "x$ProgramFiles" != x; then
26699    VIRTUAL_DIR="$ProgramFiles/Java"
26700
26701  windows_path="$VIRTUAL_DIR"
26702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26703    unix_path=`$CYGPATH -u "$windows_path"`
26704    VIRTUAL_DIR="$unix_path"
26705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26707    VIRTUAL_DIR="$unix_path"
26708  fi
26709
26710
26711  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26712  BOOT_JDK_SUFFIX=""
26713  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26714  if test "x$ALL_JDKS_FOUND" != x; then
26715    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26716
26717  if test "x$BOOT_JDK_FOUND" = xno; then
26718    # Now execute the test
26719
26720        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26721        if test -d "$BOOT_JDK"; then
26722          BOOT_JDK_FOUND=maybe
26723          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26724$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26725        fi
26726
26727
26728    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26729    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26730      # Do we have a bin/java?
26731      if test ! -x "$BOOT_JDK/bin/java"; then
26732        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26733$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26734        BOOT_JDK_FOUND=no
26735      else
26736        # Do we have a bin/javac?
26737        if test ! -x "$BOOT_JDK/bin/javac"; then
26738          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26739$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26740          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26741$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26742          BOOT_JDK_FOUND=no
26743        else
26744          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26745          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26746
26747          # Extra M4 quote needed to protect [] in grep expression.
26748          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26749          if test "x$FOUND_CORRECT_VERSION" = x; then
26750            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26752            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26753$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26754            BOOT_JDK_FOUND=no
26755          else
26756            # We're done! :-)
26757            BOOT_JDK_FOUND=yes
26758
26759  # Only process if variable expands to non-empty
26760
26761  if test "x$BOOT_JDK" != x; then
26762    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26763
26764  # Input might be given as Windows format, start by converting to
26765  # unix format.
26766  path="$BOOT_JDK"
26767  new_path=`$CYGPATH -u "$path"`
26768
26769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26772  # "foo.exe" is OK but "foo" is an error.
26773  #
26774  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26775  # It is also a way to make sure we got the proper file name for the real test later on.
26776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26777  if test "x$test_shortpath" = x; then
26778    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26779$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26780    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26781  fi
26782
26783  # Call helper function which possibly converts this using DOS-style short mode.
26784  # If so, the updated path is stored in $new_path.
26785
26786  input_path="$new_path"
26787  # Check if we need to convert this using DOS-style short mode. If the path
26788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26789  # take no chances and rewrite it.
26790  # Note: m4 eats our [], so we need to use [ and ] instead.
26791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26792  if test "x$has_forbidden_chars" != x; then
26793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26794    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26795    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26796    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26797      # Going to short mode and back again did indeed matter. Since short mode is
26798      # case insensitive, let's make it lowercase to improve readability.
26799      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26800      # Now convert it back to Unix-style (cygpath)
26801      input_path=`$CYGPATH -u "$shortmode_path"`
26802      new_path="$input_path"
26803    fi
26804  fi
26805
26806  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26807  if test "x$test_cygdrive_prefix" = x; then
26808    # As a simple fix, exclude /usr/bin since it's not a real path.
26809    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26810      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26811      # a path prefixed by /cygdrive for fixpath to work.
26812      new_path="$CYGWIN_ROOT_PATH$input_path"
26813    fi
26814  fi
26815
26816
26817  if test "x$path" != "x$new_path"; then
26818    BOOT_JDK="$new_path"
26819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26820$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26821  fi
26822
26823    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26824
26825  path="$BOOT_JDK"
26826  has_colon=`$ECHO $path | $GREP ^.:`
26827  new_path="$path"
26828  if test "x$has_colon" = x; then
26829    # Not in mixed or Windows style, start by that.
26830    new_path=`cmd //c echo $path`
26831  fi
26832
26833
26834  input_path="$new_path"
26835  # Check if we need to convert this using DOS-style short mode. If the path
26836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26837  # take no chances and rewrite it.
26838  # Note: m4 eats our [], so we need to use [ and ] instead.
26839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26840  if test "x$has_forbidden_chars" != x; then
26841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26842    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26843  fi
26844
26845
26846  windows_path="$new_path"
26847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26848    unix_path=`$CYGPATH -u "$windows_path"`
26849    new_path="$unix_path"
26850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26852    new_path="$unix_path"
26853  fi
26854
26855  if test "x$path" != "x$new_path"; then
26856    BOOT_JDK="$new_path"
26857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26858$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26859  fi
26860
26861  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26862  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26863
26864    else
26865      # We're on a unix platform. Hooray! :)
26866      path="$BOOT_JDK"
26867      has_space=`$ECHO "$path" | $GREP " "`
26868      if test "x$has_space" != x; then
26869        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26870$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26871        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26872      fi
26873
26874      # Use eval to expand a potential ~
26875      eval path="$path"
26876      if test ! -f "$path" && test ! -d "$path"; then
26877        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26878      fi
26879
26880      if test -d "$path"; then
26881        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26882      else
26883        dir="`$DIRNAME "$path"`"
26884        base="`$BASENAME "$path"`"
26885        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26886      fi
26887    fi
26888  fi
26889
26890            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26891$as_echo_n "checking for Boot JDK... " >&6; }
26892            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26893$as_echo "$BOOT_JDK" >&6; }
26894            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26895$as_echo_n "checking Boot JDK version... " >&6; }
26896            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26897            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26898$as_echo "$BOOT_JDK_VERSION" >&6; }
26899          fi # end check jdk version
26900        fi # end check javac
26901      fi # end check java
26902    fi # end check boot jdk found
26903  fi
26904
26905    done
26906  fi
26907
26908  fi
26909
26910
26911    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26912    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26913      # Do we have a bin/java?
26914      if test ! -x "$BOOT_JDK/bin/java"; then
26915        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26917        BOOT_JDK_FOUND=no
26918      else
26919        # Do we have a bin/javac?
26920        if test ! -x "$BOOT_JDK/bin/javac"; then
26921          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26922$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26923          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26924$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26925          BOOT_JDK_FOUND=no
26926        else
26927          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26928          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26929
26930          # Extra M4 quote needed to protect [] in grep expression.
26931          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26932          if test "x$FOUND_CORRECT_VERSION" = x; then
26933            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26934$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26935            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26936$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26937            BOOT_JDK_FOUND=no
26938          else
26939            # We're done! :-)
26940            BOOT_JDK_FOUND=yes
26941
26942  # Only process if variable expands to non-empty
26943
26944  if test "x$BOOT_JDK" != x; then
26945    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26946
26947  # Input might be given as Windows format, start by converting to
26948  # unix format.
26949  path="$BOOT_JDK"
26950  new_path=`$CYGPATH -u "$path"`
26951
26952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26955  # "foo.exe" is OK but "foo" is an error.
26956  #
26957  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26958  # It is also a way to make sure we got the proper file name for the real test later on.
26959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26960  if test "x$test_shortpath" = x; then
26961    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26962$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26963    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26964  fi
26965
26966  # Call helper function which possibly converts this using DOS-style short mode.
26967  # If so, the updated path is stored in $new_path.
26968
26969  input_path="$new_path"
26970  # Check if we need to convert this using DOS-style short mode. If the path
26971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26972  # take no chances and rewrite it.
26973  # Note: m4 eats our [], so we need to use [ and ] instead.
26974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26975  if test "x$has_forbidden_chars" != x; then
26976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26977    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26978    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26979    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26980      # Going to short mode and back again did indeed matter. Since short mode is
26981      # case insensitive, let's make it lowercase to improve readability.
26982      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26983      # Now convert it back to Unix-style (cygpath)
26984      input_path=`$CYGPATH -u "$shortmode_path"`
26985      new_path="$input_path"
26986    fi
26987  fi
26988
26989  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26990  if test "x$test_cygdrive_prefix" = x; then
26991    # As a simple fix, exclude /usr/bin since it's not a real path.
26992    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26993      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26994      # a path prefixed by /cygdrive for fixpath to work.
26995      new_path="$CYGWIN_ROOT_PATH$input_path"
26996    fi
26997  fi
26998
26999
27000  if test "x$path" != "x$new_path"; then
27001    BOOT_JDK="$new_path"
27002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27003$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27004  fi
27005
27006    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27007
27008  path="$BOOT_JDK"
27009  has_colon=`$ECHO $path | $GREP ^.:`
27010  new_path="$path"
27011  if test "x$has_colon" = x; then
27012    # Not in mixed or Windows style, start by that.
27013    new_path=`cmd //c echo $path`
27014  fi
27015
27016
27017  input_path="$new_path"
27018  # Check if we need to convert this using DOS-style short mode. If the path
27019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27020  # take no chances and rewrite it.
27021  # Note: m4 eats our [], so we need to use [ and ] instead.
27022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27023  if test "x$has_forbidden_chars" != x; then
27024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27025    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27026  fi
27027
27028
27029  windows_path="$new_path"
27030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27031    unix_path=`$CYGPATH -u "$windows_path"`
27032    new_path="$unix_path"
27033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27035    new_path="$unix_path"
27036  fi
27037
27038  if test "x$path" != "x$new_path"; then
27039    BOOT_JDK="$new_path"
27040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27041$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27042  fi
27043
27044  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27045  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27046
27047    else
27048      # We're on a unix platform. Hooray! :)
27049      path="$BOOT_JDK"
27050      has_space=`$ECHO "$path" | $GREP " "`
27051      if test "x$has_space" != x; then
27052        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27053$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27054        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27055      fi
27056
27057      # Use eval to expand a potential ~
27058      eval path="$path"
27059      if test ! -f "$path" && test ! -d "$path"; then
27060        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27061      fi
27062
27063      if test -d "$path"; then
27064        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27065      else
27066        dir="`$DIRNAME "$path"`"
27067        base="`$BASENAME "$path"`"
27068        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27069      fi
27070    fi
27071  fi
27072
27073            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27074$as_echo_n "checking for Boot JDK... " >&6; }
27075            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27076$as_echo "$BOOT_JDK" >&6; }
27077            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27078$as_echo_n "checking Boot JDK version... " >&6; }
27079            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27080            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27081$as_echo "$BOOT_JDK_VERSION" >&6; }
27082          fi # end check jdk version
27083        fi # end check javac
27084      fi # end check java
27085    fi # end check boot jdk found
27086  fi
27087
27088
27089  if test "x$BOOT_JDK_FOUND" = xno; then
27090    # Now execute the test
27091
27092  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27093  BOOT_JDK_SUFFIX=""
27094  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27095  if test "x$ALL_JDKS_FOUND" != x; then
27096    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27097
27098  if test "x$BOOT_JDK_FOUND" = xno; then
27099    # Now execute the test
27100
27101        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27102        if test -d "$BOOT_JDK"; then
27103          BOOT_JDK_FOUND=maybe
27104          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27105$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27106        fi
27107
27108
27109    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27110    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27111      # Do we have a bin/java?
27112      if test ! -x "$BOOT_JDK/bin/java"; then
27113        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27114$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27115        BOOT_JDK_FOUND=no
27116      else
27117        # Do we have a bin/javac?
27118        if test ! -x "$BOOT_JDK/bin/javac"; then
27119          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27121          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27122$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27123          BOOT_JDK_FOUND=no
27124        else
27125          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27126          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27127
27128          # Extra M4 quote needed to protect [] in grep expression.
27129          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27130          if test "x$FOUND_CORRECT_VERSION" = x; then
27131            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27133            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27134$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27135            BOOT_JDK_FOUND=no
27136          else
27137            # We're done! :-)
27138            BOOT_JDK_FOUND=yes
27139
27140  # Only process if variable expands to non-empty
27141
27142  if test "x$BOOT_JDK" != x; then
27143    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27144
27145  # Input might be given as Windows format, start by converting to
27146  # unix format.
27147  path="$BOOT_JDK"
27148  new_path=`$CYGPATH -u "$path"`
27149
27150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27153  # "foo.exe" is OK but "foo" is an error.
27154  #
27155  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27156  # It is also a way to make sure we got the proper file name for the real test later on.
27157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27158  if test "x$test_shortpath" = x; then
27159    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27160$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27161    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27162  fi
27163
27164  # Call helper function which possibly converts this using DOS-style short mode.
27165  # If so, the updated path is stored in $new_path.
27166
27167  input_path="$new_path"
27168  # Check if we need to convert this using DOS-style short mode. If the path
27169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27170  # take no chances and rewrite it.
27171  # Note: m4 eats our [], so we need to use [ and ] instead.
27172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27173  if test "x$has_forbidden_chars" != x; then
27174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27178      # Going to short mode and back again did indeed matter. Since short mode is
27179      # case insensitive, let's make it lowercase to improve readability.
27180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27181      # Now convert it back to Unix-style (cygpath)
27182      input_path=`$CYGPATH -u "$shortmode_path"`
27183      new_path="$input_path"
27184    fi
27185  fi
27186
27187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27188  if test "x$test_cygdrive_prefix" = x; then
27189    # As a simple fix, exclude /usr/bin since it's not a real path.
27190    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27192      # a path prefixed by /cygdrive for fixpath to work.
27193      new_path="$CYGWIN_ROOT_PATH$input_path"
27194    fi
27195  fi
27196
27197
27198  if test "x$path" != "x$new_path"; then
27199    BOOT_JDK="$new_path"
27200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27201$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27202  fi
27203
27204    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27205
27206  path="$BOOT_JDK"
27207  has_colon=`$ECHO $path | $GREP ^.:`
27208  new_path="$path"
27209  if test "x$has_colon" = x; then
27210    # Not in mixed or Windows style, start by that.
27211    new_path=`cmd //c echo $path`
27212  fi
27213
27214
27215  input_path="$new_path"
27216  # Check if we need to convert this using DOS-style short mode. If the path
27217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27218  # take no chances and rewrite it.
27219  # Note: m4 eats our [], so we need to use [ and ] instead.
27220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27221  if test "x$has_forbidden_chars" != x; then
27222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27224  fi
27225
27226
27227  windows_path="$new_path"
27228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27229    unix_path=`$CYGPATH -u "$windows_path"`
27230    new_path="$unix_path"
27231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27233    new_path="$unix_path"
27234  fi
27235
27236  if test "x$path" != "x$new_path"; then
27237    BOOT_JDK="$new_path"
27238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27239$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27240  fi
27241
27242  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27243  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27244
27245    else
27246      # We're on a unix platform. Hooray! :)
27247      path="$BOOT_JDK"
27248      has_space=`$ECHO "$path" | $GREP " "`
27249      if test "x$has_space" != x; then
27250        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27251$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27252        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27253      fi
27254
27255      # Use eval to expand a potential ~
27256      eval path="$path"
27257      if test ! -f "$path" && test ! -d "$path"; then
27258        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27259      fi
27260
27261      if test -d "$path"; then
27262        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27263      else
27264        dir="`$DIRNAME "$path"`"
27265        base="`$BASENAME "$path"`"
27266        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27267      fi
27268    fi
27269  fi
27270
27271            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27272$as_echo_n "checking for Boot JDK... " >&6; }
27273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27274$as_echo "$BOOT_JDK" >&6; }
27275            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27276$as_echo_n "checking Boot JDK version... " >&6; }
27277            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27278            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27279$as_echo "$BOOT_JDK_VERSION" >&6; }
27280          fi # end check jdk version
27281        fi # end check javac
27282      fi # end check java
27283    fi # end check boot jdk found
27284  fi
27285
27286    done
27287  fi
27288
27289
27290    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27291    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27292      # Do we have a bin/java?
27293      if test ! -x "$BOOT_JDK/bin/java"; then
27294        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27295$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27296        BOOT_JDK_FOUND=no
27297      else
27298        # Do we have a bin/javac?
27299        if test ! -x "$BOOT_JDK/bin/javac"; then
27300          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27301$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27302          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27303$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27304          BOOT_JDK_FOUND=no
27305        else
27306          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27307          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27308
27309          # Extra M4 quote needed to protect [] in grep expression.
27310          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27311          if test "x$FOUND_CORRECT_VERSION" = x; then
27312            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27314            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27315$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27316            BOOT_JDK_FOUND=no
27317          else
27318            # We're done! :-)
27319            BOOT_JDK_FOUND=yes
27320
27321  # Only process if variable expands to non-empty
27322
27323  if test "x$BOOT_JDK" != x; then
27324    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27325
27326  # Input might be given as Windows format, start by converting to
27327  # unix format.
27328  path="$BOOT_JDK"
27329  new_path=`$CYGPATH -u "$path"`
27330
27331  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27332  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27333  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27334  # "foo.exe" is OK but "foo" is an error.
27335  #
27336  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27337  # It is also a way to make sure we got the proper file name for the real test later on.
27338  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27339  if test "x$test_shortpath" = x; then
27340    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27341$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27342    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27343  fi
27344
27345  # Call helper function which possibly converts this using DOS-style short mode.
27346  # If so, the updated path is stored in $new_path.
27347
27348  input_path="$new_path"
27349  # Check if we need to convert this using DOS-style short mode. If the path
27350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27351  # take no chances and rewrite it.
27352  # Note: m4 eats our [], so we need to use [ and ] instead.
27353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27354  if test "x$has_forbidden_chars" != x; then
27355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27356    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27357    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27358    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27359      # Going to short mode and back again did indeed matter. Since short mode is
27360      # case insensitive, let's make it lowercase to improve readability.
27361      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27362      # Now convert it back to Unix-style (cygpath)
27363      input_path=`$CYGPATH -u "$shortmode_path"`
27364      new_path="$input_path"
27365    fi
27366  fi
27367
27368  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27369  if test "x$test_cygdrive_prefix" = x; then
27370    # As a simple fix, exclude /usr/bin since it's not a real path.
27371    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27372      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27373      # a path prefixed by /cygdrive for fixpath to work.
27374      new_path="$CYGWIN_ROOT_PATH$input_path"
27375    fi
27376  fi
27377
27378
27379  if test "x$path" != "x$new_path"; then
27380    BOOT_JDK="$new_path"
27381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27382$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27383  fi
27384
27385    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27386
27387  path="$BOOT_JDK"
27388  has_colon=`$ECHO $path | $GREP ^.:`
27389  new_path="$path"
27390  if test "x$has_colon" = x; then
27391    # Not in mixed or Windows style, start by that.
27392    new_path=`cmd //c echo $path`
27393  fi
27394
27395
27396  input_path="$new_path"
27397  # Check if we need to convert this using DOS-style short mode. If the path
27398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27399  # take no chances and rewrite it.
27400  # Note: m4 eats our [], so we need to use [ and ] instead.
27401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27402  if test "x$has_forbidden_chars" != x; then
27403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27404    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27405  fi
27406
27407
27408  windows_path="$new_path"
27409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27410    unix_path=`$CYGPATH -u "$windows_path"`
27411    new_path="$unix_path"
27412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27414    new_path="$unix_path"
27415  fi
27416
27417  if test "x$path" != "x$new_path"; then
27418    BOOT_JDK="$new_path"
27419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27420$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27421  fi
27422
27423  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27424  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27425
27426    else
27427      # We're on a unix platform. Hooray! :)
27428      path="$BOOT_JDK"
27429      has_space=`$ECHO "$path" | $GREP " "`
27430      if test "x$has_space" != x; then
27431        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27432$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27433        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27434      fi
27435
27436      # Use eval to expand a potential ~
27437      eval path="$path"
27438      if test ! -f "$path" && test ! -d "$path"; then
27439        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27440      fi
27441
27442      if test -d "$path"; then
27443        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27444      else
27445        dir="`$DIRNAME "$path"`"
27446        base="`$BASENAME "$path"`"
27447        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27448      fi
27449    fi
27450  fi
27451
27452            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27453$as_echo_n "checking for Boot JDK... " >&6; }
27454            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27455$as_echo "$BOOT_JDK" >&6; }
27456            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27457$as_echo_n "checking Boot JDK version... " >&6; }
27458            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27459            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27460$as_echo "$BOOT_JDK_VERSION" >&6; }
27461          fi # end check jdk version
27462        fi # end check javac
27463      fi # end check java
27464    fi # end check boot jdk found
27465  fi
27466
27467  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27468
27469  if test "x$BOOT_JDK_FOUND" = xno; then
27470    # Now execute the test
27471
27472  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27473  BOOT_JDK_SUFFIX="/Contents/Home"
27474  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27475  if test "x$ALL_JDKS_FOUND" != x; then
27476    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27477
27478  if test "x$BOOT_JDK_FOUND" = xno; then
27479    # Now execute the test
27480
27481        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27482        if test -d "$BOOT_JDK"; then
27483          BOOT_JDK_FOUND=maybe
27484          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27485$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27486        fi
27487
27488
27489    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27490    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27491      # Do we have a bin/java?
27492      if test ! -x "$BOOT_JDK/bin/java"; then
27493        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27494$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27495        BOOT_JDK_FOUND=no
27496      else
27497        # Do we have a bin/javac?
27498        if test ! -x "$BOOT_JDK/bin/javac"; then
27499          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27500$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27501          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27502$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27503          BOOT_JDK_FOUND=no
27504        else
27505          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27506          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27507
27508          # Extra M4 quote needed to protect [] in grep expression.
27509          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27510          if test "x$FOUND_CORRECT_VERSION" = x; then
27511            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27513            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27514$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27515            BOOT_JDK_FOUND=no
27516          else
27517            # We're done! :-)
27518            BOOT_JDK_FOUND=yes
27519
27520  # Only process if variable expands to non-empty
27521
27522  if test "x$BOOT_JDK" != x; then
27523    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27524
27525  # Input might be given as Windows format, start by converting to
27526  # unix format.
27527  path="$BOOT_JDK"
27528  new_path=`$CYGPATH -u "$path"`
27529
27530  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27531  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27532  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27533  # "foo.exe" is OK but "foo" is an error.
27534  #
27535  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27536  # It is also a way to make sure we got the proper file name for the real test later on.
27537  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27538  if test "x$test_shortpath" = x; then
27539    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27540$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27541    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27542  fi
27543
27544  # Call helper function which possibly converts this using DOS-style short mode.
27545  # If so, the updated path is stored in $new_path.
27546
27547  input_path="$new_path"
27548  # Check if we need to convert this using DOS-style short mode. If the path
27549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27550  # take no chances and rewrite it.
27551  # Note: m4 eats our [], so we need to use [ and ] instead.
27552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27553  if test "x$has_forbidden_chars" != x; then
27554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27555    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27556    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27557    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27558      # Going to short mode and back again did indeed matter. Since short mode is
27559      # case insensitive, let's make it lowercase to improve readability.
27560      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27561      # Now convert it back to Unix-style (cygpath)
27562      input_path=`$CYGPATH -u "$shortmode_path"`
27563      new_path="$input_path"
27564    fi
27565  fi
27566
27567  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27568  if test "x$test_cygdrive_prefix" = x; then
27569    # As a simple fix, exclude /usr/bin since it's not a real path.
27570    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27571      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27572      # a path prefixed by /cygdrive for fixpath to work.
27573      new_path="$CYGWIN_ROOT_PATH$input_path"
27574    fi
27575  fi
27576
27577
27578  if test "x$path" != "x$new_path"; then
27579    BOOT_JDK="$new_path"
27580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27581$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27582  fi
27583
27584    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27585
27586  path="$BOOT_JDK"
27587  has_colon=`$ECHO $path | $GREP ^.:`
27588  new_path="$path"
27589  if test "x$has_colon" = x; then
27590    # Not in mixed or Windows style, start by that.
27591    new_path=`cmd //c echo $path`
27592  fi
27593
27594
27595  input_path="$new_path"
27596  # Check if we need to convert this using DOS-style short mode. If the path
27597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27598  # take no chances and rewrite it.
27599  # Note: m4 eats our [], so we need to use [ and ] instead.
27600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27601  if test "x$has_forbidden_chars" != x; then
27602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27604  fi
27605
27606
27607  windows_path="$new_path"
27608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27609    unix_path=`$CYGPATH -u "$windows_path"`
27610    new_path="$unix_path"
27611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27613    new_path="$unix_path"
27614  fi
27615
27616  if test "x$path" != "x$new_path"; then
27617    BOOT_JDK="$new_path"
27618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27620  fi
27621
27622  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27623  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27624
27625    else
27626      # We're on a unix platform. Hooray! :)
27627      path="$BOOT_JDK"
27628      has_space=`$ECHO "$path" | $GREP " "`
27629      if test "x$has_space" != x; then
27630        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27631$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27632        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27633      fi
27634
27635      # Use eval to expand a potential ~
27636      eval path="$path"
27637      if test ! -f "$path" && test ! -d "$path"; then
27638        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27639      fi
27640
27641      if test -d "$path"; then
27642        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27643      else
27644        dir="`$DIRNAME "$path"`"
27645        base="`$BASENAME "$path"`"
27646        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27647      fi
27648    fi
27649  fi
27650
27651            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27652$as_echo_n "checking for Boot JDK... " >&6; }
27653            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27654$as_echo "$BOOT_JDK" >&6; }
27655            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27656$as_echo_n "checking Boot JDK version... " >&6; }
27657            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27658            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27659$as_echo "$BOOT_JDK_VERSION" >&6; }
27660          fi # end check jdk version
27661        fi # end check javac
27662      fi # end check java
27663    fi # end check boot jdk found
27664  fi
27665
27666    done
27667  fi
27668
27669
27670    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27671    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27672      # Do we have a bin/java?
27673      if test ! -x "$BOOT_JDK/bin/java"; then
27674        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27675$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27676        BOOT_JDK_FOUND=no
27677      else
27678        # Do we have a bin/javac?
27679        if test ! -x "$BOOT_JDK/bin/javac"; then
27680          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27681$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27682          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27683$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27684          BOOT_JDK_FOUND=no
27685        else
27686          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27687          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27688
27689          # Extra M4 quote needed to protect [] in grep expression.
27690          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27691          if test "x$FOUND_CORRECT_VERSION" = x; then
27692            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27693$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27694            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27695$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27696            BOOT_JDK_FOUND=no
27697          else
27698            # We're done! :-)
27699            BOOT_JDK_FOUND=yes
27700
27701  # Only process if variable expands to non-empty
27702
27703  if test "x$BOOT_JDK" != x; then
27704    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27705
27706  # Input might be given as Windows format, start by converting to
27707  # unix format.
27708  path="$BOOT_JDK"
27709  new_path=`$CYGPATH -u "$path"`
27710
27711  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27712  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27713  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27714  # "foo.exe" is OK but "foo" is an error.
27715  #
27716  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27717  # It is also a way to make sure we got the proper file name for the real test later on.
27718  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27719  if test "x$test_shortpath" = x; then
27720    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27721$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27722    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27723  fi
27724
27725  # Call helper function which possibly converts this using DOS-style short mode.
27726  # If so, the updated path is stored in $new_path.
27727
27728  input_path="$new_path"
27729  # Check if we need to convert this using DOS-style short mode. If the path
27730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27731  # take no chances and rewrite it.
27732  # Note: m4 eats our [], so we need to use [ and ] instead.
27733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27734  if test "x$has_forbidden_chars" != x; then
27735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27739      # Going to short mode and back again did indeed matter. Since short mode is
27740      # case insensitive, let's make it lowercase to improve readability.
27741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27742      # Now convert it back to Unix-style (cygpath)
27743      input_path=`$CYGPATH -u "$shortmode_path"`
27744      new_path="$input_path"
27745    fi
27746  fi
27747
27748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27749  if test "x$test_cygdrive_prefix" = x; then
27750    # As a simple fix, exclude /usr/bin since it's not a real path.
27751    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27753      # a path prefixed by /cygdrive for fixpath to work.
27754      new_path="$CYGWIN_ROOT_PATH$input_path"
27755    fi
27756  fi
27757
27758
27759  if test "x$path" != "x$new_path"; then
27760    BOOT_JDK="$new_path"
27761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27762$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27763  fi
27764
27765    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27766
27767  path="$BOOT_JDK"
27768  has_colon=`$ECHO $path | $GREP ^.:`
27769  new_path="$path"
27770  if test "x$has_colon" = x; then
27771    # Not in mixed or Windows style, start by that.
27772    new_path=`cmd //c echo $path`
27773  fi
27774
27775
27776  input_path="$new_path"
27777  # Check if we need to convert this using DOS-style short mode. If the path
27778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27779  # take no chances and rewrite it.
27780  # Note: m4 eats our [], so we need to use [ and ] instead.
27781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27782  if test "x$has_forbidden_chars" != x; then
27783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27784    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27785  fi
27786
27787
27788  windows_path="$new_path"
27789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27790    unix_path=`$CYGPATH -u "$windows_path"`
27791    new_path="$unix_path"
27792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27794    new_path="$unix_path"
27795  fi
27796
27797  if test "x$path" != "x$new_path"; then
27798    BOOT_JDK="$new_path"
27799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27800$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27801  fi
27802
27803  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27804  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27805
27806    else
27807      # We're on a unix platform. Hooray! :)
27808      path="$BOOT_JDK"
27809      has_space=`$ECHO "$path" | $GREP " "`
27810      if test "x$has_space" != x; then
27811        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27812$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27813        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27814      fi
27815
27816      # Use eval to expand a potential ~
27817      eval path="$path"
27818      if test ! -f "$path" && test ! -d "$path"; then
27819        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27820      fi
27821
27822      if test -d "$path"; then
27823        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27824      else
27825        dir="`$DIRNAME "$path"`"
27826        base="`$BASENAME "$path"`"
27827        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27828      fi
27829    fi
27830  fi
27831
27832            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27833$as_echo_n "checking for Boot JDK... " >&6; }
27834            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27835$as_echo "$BOOT_JDK" >&6; }
27836            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27837$as_echo_n "checking Boot JDK version... " >&6; }
27838            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27839            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27840$as_echo "$BOOT_JDK_VERSION" >&6; }
27841          fi # end check jdk version
27842        fi # end check javac
27843      fi # end check java
27844    fi # end check boot jdk found
27845  fi
27846
27847
27848  if test "x$BOOT_JDK_FOUND" = xno; then
27849    # Now execute the test
27850
27851  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27852  BOOT_JDK_SUFFIX="/Contents/Home"
27853  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27854  if test "x$ALL_JDKS_FOUND" != x; then
27855    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27856
27857  if test "x$BOOT_JDK_FOUND" = xno; then
27858    # Now execute the test
27859
27860        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27861        if test -d "$BOOT_JDK"; then
27862          BOOT_JDK_FOUND=maybe
27863          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27864$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27865        fi
27866
27867
27868    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27869    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27870      # Do we have a bin/java?
27871      if test ! -x "$BOOT_JDK/bin/java"; then
27872        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27873$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27874        BOOT_JDK_FOUND=no
27875      else
27876        # Do we have a bin/javac?
27877        if test ! -x "$BOOT_JDK/bin/javac"; then
27878          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27879$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27880          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27881$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27882          BOOT_JDK_FOUND=no
27883        else
27884          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27885          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27886
27887          # Extra M4 quote needed to protect [] in grep expression.
27888          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27889          if test "x$FOUND_CORRECT_VERSION" = x; then
27890            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27892            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27893$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27894            BOOT_JDK_FOUND=no
27895          else
27896            # We're done! :-)
27897            BOOT_JDK_FOUND=yes
27898
27899  # Only process if variable expands to non-empty
27900
27901  if test "x$BOOT_JDK" != x; then
27902    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27903
27904  # Input might be given as Windows format, start by converting to
27905  # unix format.
27906  path="$BOOT_JDK"
27907  new_path=`$CYGPATH -u "$path"`
27908
27909  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27910  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27911  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27912  # "foo.exe" is OK but "foo" is an error.
27913  #
27914  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27915  # It is also a way to make sure we got the proper file name for the real test later on.
27916  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27917  if test "x$test_shortpath" = x; then
27918    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27919$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27920    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27921  fi
27922
27923  # Call helper function which possibly converts this using DOS-style short mode.
27924  # If so, the updated path is stored in $new_path.
27925
27926  input_path="$new_path"
27927  # Check if we need to convert this using DOS-style short mode. If the path
27928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27929  # take no chances and rewrite it.
27930  # Note: m4 eats our [], so we need to use [ and ] instead.
27931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27932  if test "x$has_forbidden_chars" != x; then
27933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27934    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27935    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27936    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27937      # Going to short mode and back again did indeed matter. Since short mode is
27938      # case insensitive, let's make it lowercase to improve readability.
27939      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27940      # Now convert it back to Unix-style (cygpath)
27941      input_path=`$CYGPATH -u "$shortmode_path"`
27942      new_path="$input_path"
27943    fi
27944  fi
27945
27946  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27947  if test "x$test_cygdrive_prefix" = x; then
27948    # As a simple fix, exclude /usr/bin since it's not a real path.
27949    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27950      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27951      # a path prefixed by /cygdrive for fixpath to work.
27952      new_path="$CYGWIN_ROOT_PATH$input_path"
27953    fi
27954  fi
27955
27956
27957  if test "x$path" != "x$new_path"; then
27958    BOOT_JDK="$new_path"
27959    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27960$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27961  fi
27962
27963    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27964
27965  path="$BOOT_JDK"
27966  has_colon=`$ECHO $path | $GREP ^.:`
27967  new_path="$path"
27968  if test "x$has_colon" = x; then
27969    # Not in mixed or Windows style, start by that.
27970    new_path=`cmd //c echo $path`
27971  fi
27972
27973
27974  input_path="$new_path"
27975  # Check if we need to convert this using DOS-style short mode. If the path
27976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27977  # take no chances and rewrite it.
27978  # Note: m4 eats our [], so we need to use [ and ] instead.
27979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27980  if test "x$has_forbidden_chars" != x; then
27981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27982    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27983  fi
27984
27985
27986  windows_path="$new_path"
27987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27988    unix_path=`$CYGPATH -u "$windows_path"`
27989    new_path="$unix_path"
27990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27992    new_path="$unix_path"
27993  fi
27994
27995  if test "x$path" != "x$new_path"; then
27996    BOOT_JDK="$new_path"
27997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27998$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27999  fi
28000
28001  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28002  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28003
28004    else
28005      # We're on a unix platform. Hooray! :)
28006      path="$BOOT_JDK"
28007      has_space=`$ECHO "$path" | $GREP " "`
28008      if test "x$has_space" != x; then
28009        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28010$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28011        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28012      fi
28013
28014      # Use eval to expand a potential ~
28015      eval path="$path"
28016      if test ! -f "$path" && test ! -d "$path"; then
28017        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28018      fi
28019
28020      if test -d "$path"; then
28021        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28022      else
28023        dir="`$DIRNAME "$path"`"
28024        base="`$BASENAME "$path"`"
28025        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28026      fi
28027    fi
28028  fi
28029
28030            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28031$as_echo_n "checking for Boot JDK... " >&6; }
28032            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28033$as_echo "$BOOT_JDK" >&6; }
28034            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28035$as_echo_n "checking Boot JDK version... " >&6; }
28036            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28037            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28038$as_echo "$BOOT_JDK_VERSION" >&6; }
28039          fi # end check jdk version
28040        fi # end check javac
28041      fi # end check java
28042    fi # end check boot jdk found
28043  fi
28044
28045    done
28046  fi
28047
28048
28049    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28050    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28051      # Do we have a bin/java?
28052      if test ! -x "$BOOT_JDK/bin/java"; then
28053        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28054$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28055        BOOT_JDK_FOUND=no
28056      else
28057        # Do we have a bin/javac?
28058        if test ! -x "$BOOT_JDK/bin/javac"; then
28059          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28060$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28061          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28062$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28063          BOOT_JDK_FOUND=no
28064        else
28065          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28066          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28067
28068          # Extra M4 quote needed to protect [] in grep expression.
28069          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28070          if test "x$FOUND_CORRECT_VERSION" = x; then
28071            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28072$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28073            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28074$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28075            BOOT_JDK_FOUND=no
28076          else
28077            # We're done! :-)
28078            BOOT_JDK_FOUND=yes
28079
28080  # Only process if variable expands to non-empty
28081
28082  if test "x$BOOT_JDK" != x; then
28083    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28084
28085  # Input might be given as Windows format, start by converting to
28086  # unix format.
28087  path="$BOOT_JDK"
28088  new_path=`$CYGPATH -u "$path"`
28089
28090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28093  # "foo.exe" is OK but "foo" is an error.
28094  #
28095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28096  # It is also a way to make sure we got the proper file name for the real test later on.
28097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28098  if test "x$test_shortpath" = x; then
28099    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28100$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28101    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28102  fi
28103
28104  # Call helper function which possibly converts this using DOS-style short mode.
28105  # If so, the updated path is stored in $new_path.
28106
28107  input_path="$new_path"
28108  # Check if we need to convert this using DOS-style short mode. If the path
28109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28110  # take no chances and rewrite it.
28111  # Note: m4 eats our [], so we need to use [ and ] instead.
28112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28113  if test "x$has_forbidden_chars" != x; then
28114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28118      # Going to short mode and back again did indeed matter. Since short mode is
28119      # case insensitive, let's make it lowercase to improve readability.
28120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28121      # Now convert it back to Unix-style (cygpath)
28122      input_path=`$CYGPATH -u "$shortmode_path"`
28123      new_path="$input_path"
28124    fi
28125  fi
28126
28127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28128  if test "x$test_cygdrive_prefix" = x; then
28129    # As a simple fix, exclude /usr/bin since it's not a real path.
28130    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28132      # a path prefixed by /cygdrive for fixpath to work.
28133      new_path="$CYGWIN_ROOT_PATH$input_path"
28134    fi
28135  fi
28136
28137
28138  if test "x$path" != "x$new_path"; then
28139    BOOT_JDK="$new_path"
28140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28141$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28142  fi
28143
28144    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28145
28146  path="$BOOT_JDK"
28147  has_colon=`$ECHO $path | $GREP ^.:`
28148  new_path="$path"
28149  if test "x$has_colon" = x; then
28150    # Not in mixed or Windows style, start by that.
28151    new_path=`cmd //c echo $path`
28152  fi
28153
28154
28155  input_path="$new_path"
28156  # Check if we need to convert this using DOS-style short mode. If the path
28157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28158  # take no chances and rewrite it.
28159  # Note: m4 eats our [], so we need to use [ and ] instead.
28160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28161  if test "x$has_forbidden_chars" != x; then
28162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28164  fi
28165
28166
28167  windows_path="$new_path"
28168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28169    unix_path=`$CYGPATH -u "$windows_path"`
28170    new_path="$unix_path"
28171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28173    new_path="$unix_path"
28174  fi
28175
28176  if test "x$path" != "x$new_path"; then
28177    BOOT_JDK="$new_path"
28178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28179$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28180  fi
28181
28182  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28183  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28184
28185    else
28186      # We're on a unix platform. Hooray! :)
28187      path="$BOOT_JDK"
28188      has_space=`$ECHO "$path" | $GREP " "`
28189      if test "x$has_space" != x; then
28190        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28191$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28192        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28193      fi
28194
28195      # Use eval to expand a potential ~
28196      eval path="$path"
28197      if test ! -f "$path" && test ! -d "$path"; then
28198        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28199      fi
28200
28201      if test -d "$path"; then
28202        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28203      else
28204        dir="`$DIRNAME "$path"`"
28205        base="`$BASENAME "$path"`"
28206        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28207      fi
28208    fi
28209  fi
28210
28211            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28212$as_echo_n "checking for Boot JDK... " >&6; }
28213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28214$as_echo "$BOOT_JDK" >&6; }
28215            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28216$as_echo_n "checking Boot JDK version... " >&6; }
28217            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28218            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28219$as_echo "$BOOT_JDK_VERSION" >&6; }
28220          fi # end check jdk version
28221        fi # end check javac
28222      fi # end check java
28223    fi # end check boot jdk found
28224  fi
28225
28226  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28227
28228  if test "x$BOOT_JDK_FOUND" = xno; then
28229    # Now execute the test
28230
28231  BOOT_JDK_PREFIX="/usr/lib/jvm"
28232  BOOT_JDK_SUFFIX=""
28233  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28234  if test "x$ALL_JDKS_FOUND" != x; then
28235    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28236
28237  if test "x$BOOT_JDK_FOUND" = xno; then
28238    # Now execute the test
28239
28240        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28241        if test -d "$BOOT_JDK"; then
28242          BOOT_JDK_FOUND=maybe
28243          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28244$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28245        fi
28246
28247
28248    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28249    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28250      # Do we have a bin/java?
28251      if test ! -x "$BOOT_JDK/bin/java"; then
28252        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28253$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28254        BOOT_JDK_FOUND=no
28255      else
28256        # Do we have a bin/javac?
28257        if test ! -x "$BOOT_JDK/bin/javac"; then
28258          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28259$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28260          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28261$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28262          BOOT_JDK_FOUND=no
28263        else
28264          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28265          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28266
28267          # Extra M4 quote needed to protect [] in grep expression.
28268          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28269          if test "x$FOUND_CORRECT_VERSION" = x; then
28270            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28271$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28272            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28273$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28274            BOOT_JDK_FOUND=no
28275          else
28276            # We're done! :-)
28277            BOOT_JDK_FOUND=yes
28278
28279  # Only process if variable expands to non-empty
28280
28281  if test "x$BOOT_JDK" != x; then
28282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28283
28284  # Input might be given as Windows format, start by converting to
28285  # unix format.
28286  path="$BOOT_JDK"
28287  new_path=`$CYGPATH -u "$path"`
28288
28289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28292  # "foo.exe" is OK but "foo" is an error.
28293  #
28294  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28295  # It is also a way to make sure we got the proper file name for the real test later on.
28296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28297  if test "x$test_shortpath" = x; then
28298    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28299$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28300    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28301  fi
28302
28303  # Call helper function which possibly converts this using DOS-style short mode.
28304  # If so, the updated path is stored in $new_path.
28305
28306  input_path="$new_path"
28307  # Check if we need to convert this using DOS-style short mode. If the path
28308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28309  # take no chances and rewrite it.
28310  # Note: m4 eats our [], so we need to use [ and ] instead.
28311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28312  if test "x$has_forbidden_chars" != x; then
28313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28317      # Going to short mode and back again did indeed matter. Since short mode is
28318      # case insensitive, let's make it lowercase to improve readability.
28319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28320      # Now convert it back to Unix-style (cygpath)
28321      input_path=`$CYGPATH -u "$shortmode_path"`
28322      new_path="$input_path"
28323    fi
28324  fi
28325
28326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28327  if test "x$test_cygdrive_prefix" = x; then
28328    # As a simple fix, exclude /usr/bin since it's not a real path.
28329    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28331      # a path prefixed by /cygdrive for fixpath to work.
28332      new_path="$CYGWIN_ROOT_PATH$input_path"
28333    fi
28334  fi
28335
28336
28337  if test "x$path" != "x$new_path"; then
28338    BOOT_JDK="$new_path"
28339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28340$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28341  fi
28342
28343    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28344
28345  path="$BOOT_JDK"
28346  has_colon=`$ECHO $path | $GREP ^.:`
28347  new_path="$path"
28348  if test "x$has_colon" = x; then
28349    # Not in mixed or Windows style, start by that.
28350    new_path=`cmd //c echo $path`
28351  fi
28352
28353
28354  input_path="$new_path"
28355  # Check if we need to convert this using DOS-style short mode. If the path
28356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28357  # take no chances and rewrite it.
28358  # Note: m4 eats our [], so we need to use [ and ] instead.
28359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28360  if test "x$has_forbidden_chars" != x; then
28361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28363  fi
28364
28365
28366  windows_path="$new_path"
28367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28368    unix_path=`$CYGPATH -u "$windows_path"`
28369    new_path="$unix_path"
28370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28372    new_path="$unix_path"
28373  fi
28374
28375  if test "x$path" != "x$new_path"; then
28376    BOOT_JDK="$new_path"
28377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28378$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28379  fi
28380
28381  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28382  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28383
28384    else
28385      # We're on a unix platform. Hooray! :)
28386      path="$BOOT_JDK"
28387      has_space=`$ECHO "$path" | $GREP " "`
28388      if test "x$has_space" != x; then
28389        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28390$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28391        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28392      fi
28393
28394      # Use eval to expand a potential ~
28395      eval path="$path"
28396      if test ! -f "$path" && test ! -d "$path"; then
28397        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28398      fi
28399
28400      if test -d "$path"; then
28401        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28402      else
28403        dir="`$DIRNAME "$path"`"
28404        base="`$BASENAME "$path"`"
28405        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28406      fi
28407    fi
28408  fi
28409
28410            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28411$as_echo_n "checking for Boot JDK... " >&6; }
28412            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28413$as_echo "$BOOT_JDK" >&6; }
28414            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28415$as_echo_n "checking Boot JDK version... " >&6; }
28416            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28417            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28418$as_echo "$BOOT_JDK_VERSION" >&6; }
28419          fi # end check jdk version
28420        fi # end check javac
28421      fi # end check java
28422    fi # end check boot jdk found
28423  fi
28424
28425    done
28426  fi
28427
28428
28429    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28430    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28431      # Do we have a bin/java?
28432      if test ! -x "$BOOT_JDK/bin/java"; then
28433        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28435        BOOT_JDK_FOUND=no
28436      else
28437        # Do we have a bin/javac?
28438        if test ! -x "$BOOT_JDK/bin/javac"; then
28439          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28441          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28442$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28443          BOOT_JDK_FOUND=no
28444        else
28445          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28446          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28447
28448          # Extra M4 quote needed to protect [] in grep expression.
28449          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28450          if test "x$FOUND_CORRECT_VERSION" = x; then
28451            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28452$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28453            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28454$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28455            BOOT_JDK_FOUND=no
28456          else
28457            # We're done! :-)
28458            BOOT_JDK_FOUND=yes
28459
28460  # Only process if variable expands to non-empty
28461
28462  if test "x$BOOT_JDK" != x; then
28463    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28464
28465  # Input might be given as Windows format, start by converting to
28466  # unix format.
28467  path="$BOOT_JDK"
28468  new_path=`$CYGPATH -u "$path"`
28469
28470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28473  # "foo.exe" is OK but "foo" is an error.
28474  #
28475  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28476  # It is also a way to make sure we got the proper file name for the real test later on.
28477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28478  if test "x$test_shortpath" = x; then
28479    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28480$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28481    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28482  fi
28483
28484  # Call helper function which possibly converts this using DOS-style short mode.
28485  # If so, the updated path is stored in $new_path.
28486
28487  input_path="$new_path"
28488  # Check if we need to convert this using DOS-style short mode. If the path
28489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28490  # take no chances and rewrite it.
28491  # Note: m4 eats our [], so we need to use [ and ] instead.
28492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28493  if test "x$has_forbidden_chars" != x; then
28494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28495    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28496    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28497    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28498      # Going to short mode and back again did indeed matter. Since short mode is
28499      # case insensitive, let's make it lowercase to improve readability.
28500      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28501      # Now convert it back to Unix-style (cygpath)
28502      input_path=`$CYGPATH -u "$shortmode_path"`
28503      new_path="$input_path"
28504    fi
28505  fi
28506
28507  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28508  if test "x$test_cygdrive_prefix" = x; then
28509    # As a simple fix, exclude /usr/bin since it's not a real path.
28510    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28511      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28512      # a path prefixed by /cygdrive for fixpath to work.
28513      new_path="$CYGWIN_ROOT_PATH$input_path"
28514    fi
28515  fi
28516
28517
28518  if test "x$path" != "x$new_path"; then
28519    BOOT_JDK="$new_path"
28520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28521$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28522  fi
28523
28524    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28525
28526  path="$BOOT_JDK"
28527  has_colon=`$ECHO $path | $GREP ^.:`
28528  new_path="$path"
28529  if test "x$has_colon" = x; then
28530    # Not in mixed or Windows style, start by that.
28531    new_path=`cmd //c echo $path`
28532  fi
28533
28534
28535  input_path="$new_path"
28536  # Check if we need to convert this using DOS-style short mode. If the path
28537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28538  # take no chances and rewrite it.
28539  # Note: m4 eats our [], so we need to use [ and ] instead.
28540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28541  if test "x$has_forbidden_chars" != x; then
28542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28544  fi
28545
28546
28547  windows_path="$new_path"
28548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28549    unix_path=`$CYGPATH -u "$windows_path"`
28550    new_path="$unix_path"
28551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28553    new_path="$unix_path"
28554  fi
28555
28556  if test "x$path" != "x$new_path"; then
28557    BOOT_JDK="$new_path"
28558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28559$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28560  fi
28561
28562  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28563  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28564
28565    else
28566      # We're on a unix platform. Hooray! :)
28567      path="$BOOT_JDK"
28568      has_space=`$ECHO "$path" | $GREP " "`
28569      if test "x$has_space" != x; then
28570        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28571$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28572        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28573      fi
28574
28575      # Use eval to expand a potential ~
28576      eval path="$path"
28577      if test ! -f "$path" && test ! -d "$path"; then
28578        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28579      fi
28580
28581      if test -d "$path"; then
28582        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28583      else
28584        dir="`$DIRNAME "$path"`"
28585        base="`$BASENAME "$path"`"
28586        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28587      fi
28588    fi
28589  fi
28590
28591            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28592$as_echo_n "checking for Boot JDK... " >&6; }
28593            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28594$as_echo "$BOOT_JDK" >&6; }
28595            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28596$as_echo_n "checking Boot JDK version... " >&6; }
28597            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28599$as_echo "$BOOT_JDK_VERSION" >&6; }
28600          fi # end check jdk version
28601        fi # end check javac
28602      fi # end check java
28603    fi # end check boot jdk found
28604  fi
28605
28606  fi
28607
28608
28609    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28610    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28611      # Do we have a bin/java?
28612      if test ! -x "$BOOT_JDK/bin/java"; then
28613        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28615        BOOT_JDK_FOUND=no
28616      else
28617        # Do we have a bin/javac?
28618        if test ! -x "$BOOT_JDK/bin/javac"; then
28619          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28620$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28621          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28622$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28623          BOOT_JDK_FOUND=no
28624        else
28625          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28626          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28627
28628          # Extra M4 quote needed to protect [] in grep expression.
28629          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28630          if test "x$FOUND_CORRECT_VERSION" = x; then
28631            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28632$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28633            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28634$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28635            BOOT_JDK_FOUND=no
28636          else
28637            # We're done! :-)
28638            BOOT_JDK_FOUND=yes
28639
28640  # Only process if variable expands to non-empty
28641
28642  if test "x$BOOT_JDK" != x; then
28643    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28644
28645  # Input might be given as Windows format, start by converting to
28646  # unix format.
28647  path="$BOOT_JDK"
28648  new_path=`$CYGPATH -u "$path"`
28649
28650  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28651  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28652  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28653  # "foo.exe" is OK but "foo" is an error.
28654  #
28655  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28656  # It is also a way to make sure we got the proper file name for the real test later on.
28657  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28658  if test "x$test_shortpath" = x; then
28659    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28660$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28661    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28662  fi
28663
28664  # Call helper function which possibly converts this using DOS-style short mode.
28665  # If so, the updated path is stored in $new_path.
28666
28667  input_path="$new_path"
28668  # Check if we need to convert this using DOS-style short mode. If the path
28669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28670  # take no chances and rewrite it.
28671  # Note: m4 eats our [], so we need to use [ and ] instead.
28672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28673  if test "x$has_forbidden_chars" != x; then
28674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28675    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28676    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28677    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28678      # Going to short mode and back again did indeed matter. Since short mode is
28679      # case insensitive, let's make it lowercase to improve readability.
28680      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28681      # Now convert it back to Unix-style (cygpath)
28682      input_path=`$CYGPATH -u "$shortmode_path"`
28683      new_path="$input_path"
28684    fi
28685  fi
28686
28687  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28688  if test "x$test_cygdrive_prefix" = x; then
28689    # As a simple fix, exclude /usr/bin since it's not a real path.
28690    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28691      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28692      # a path prefixed by /cygdrive for fixpath to work.
28693      new_path="$CYGWIN_ROOT_PATH$input_path"
28694    fi
28695  fi
28696
28697
28698  if test "x$path" != "x$new_path"; then
28699    BOOT_JDK="$new_path"
28700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28701$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28702  fi
28703
28704    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28705
28706  path="$BOOT_JDK"
28707  has_colon=`$ECHO $path | $GREP ^.:`
28708  new_path="$path"
28709  if test "x$has_colon" = x; then
28710    # Not in mixed or Windows style, start by that.
28711    new_path=`cmd //c echo $path`
28712  fi
28713
28714
28715  input_path="$new_path"
28716  # Check if we need to convert this using DOS-style short mode. If the path
28717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28718  # take no chances and rewrite it.
28719  # Note: m4 eats our [], so we need to use [ and ] instead.
28720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28721  if test "x$has_forbidden_chars" != x; then
28722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28724  fi
28725
28726
28727  windows_path="$new_path"
28728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28729    unix_path=`$CYGPATH -u "$windows_path"`
28730    new_path="$unix_path"
28731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28733    new_path="$unix_path"
28734  fi
28735
28736  if test "x$path" != "x$new_path"; then
28737    BOOT_JDK="$new_path"
28738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28739$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28740  fi
28741
28742  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28743  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28744
28745    else
28746      # We're on a unix platform. Hooray! :)
28747      path="$BOOT_JDK"
28748      has_space=`$ECHO "$path" | $GREP " "`
28749      if test "x$has_space" != x; then
28750        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28751$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28752        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28753      fi
28754
28755      # Use eval to expand a potential ~
28756      eval path="$path"
28757      if test ! -f "$path" && test ! -d "$path"; then
28758        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28759      fi
28760
28761      if test -d "$path"; then
28762        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28763      else
28764        dir="`$DIRNAME "$path"`"
28765        base="`$BASENAME "$path"`"
28766        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28767      fi
28768    fi
28769  fi
28770
28771            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28772$as_echo_n "checking for Boot JDK... " >&6; }
28773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28774$as_echo "$BOOT_JDK" >&6; }
28775            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28776$as_echo_n "checking Boot JDK version... " >&6; }
28777            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28778            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28779$as_echo "$BOOT_JDK_VERSION" >&6; }
28780          fi # end check jdk version
28781        fi # end check javac
28782      fi # end check java
28783    fi # end check boot jdk found
28784  fi
28785
28786
28787  # If we haven't found anything yet, we've truly lost. Give up.
28788  if test "x$BOOT_JDK_FOUND" = xno; then
28789
28790  # Print a helpful message on how to acquire the necessary build dependency.
28791  # openjdk is the help tag: freetype, cups, alsa etc
28792  MISSING_DEPENDENCY=openjdk
28793
28794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28795    cygwin_help $MISSING_DEPENDENCY
28796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28797    msys_help $MISSING_DEPENDENCY
28798  else
28799    PKGHANDLER_COMMAND=
28800
28801    case $PKGHANDLER in
28802      apt-get)
28803        apt_help     $MISSING_DEPENDENCY ;;
28804      yum)
28805        yum_help     $MISSING_DEPENDENCY ;;
28806      port)
28807        port_help    $MISSING_DEPENDENCY ;;
28808      pkgutil)
28809        pkgutil_help $MISSING_DEPENDENCY ;;
28810      pkgadd)
28811        pkgadd_help  $MISSING_DEPENDENCY ;;
28812    esac
28813
28814    if test "x$PKGHANDLER_COMMAND" != x; then
28815      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28816    fi
28817  fi
28818
28819    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28820$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28821    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28822$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28823    as_fn_error $? "Cannot continue" "$LINENO" 5
28824  fi
28825
28826
28827
28828  # Setup tools from the Boot JDK.
28829
28830  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28831
28832  # Publish this variable in the help.
28833
28834
28835  if [ -z "${JAVA+x}" ]; then
28836    # The variable is not set by user, try to locate tool using the code snippet
28837
28838      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28839$as_echo_n "checking for java in Boot JDK... " >&6; }
28840      JAVA=$BOOT_JDK/bin/java
28841      if test ! -x $JAVA; then
28842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28843$as_echo "not found" >&6; }
28844        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28845$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28846        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28847      fi
28848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28849$as_echo "ok" >&6; }
28850
28851
28852  else
28853    # The variable is set, but is it from the command line or the environment?
28854
28855    # Try to remove the string !JAVA! from our list.
28856    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28857    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28858      # If it failed, the variable was not from the command line. Ignore it,
28859      # but warn the user (except for BASH, which is always set by the calling BASH).
28860      if test "xJAVA" != xBASH; then
28861        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28862$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28863      fi
28864      # Try to locate tool using the code snippet
28865
28866      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28867$as_echo_n "checking for java in Boot JDK... " >&6; }
28868      JAVA=$BOOT_JDK/bin/java
28869      if test ! -x $JAVA; then
28870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28871$as_echo "not found" >&6; }
28872        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28873$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28874        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28875      fi
28876      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28877$as_echo "ok" >&6; }
28878
28879
28880    else
28881      # If it succeeded, then it was overridden by the user. We will use it
28882      # for the tool.
28883
28884      # First remove it from the list of overridden variables, so we can test
28885      # for unknown variables in the end.
28886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28887
28888      # Check if we try to supply an empty value
28889      if test "x$JAVA" = x; then
28890        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28891$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28892        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28893$as_echo_n "checking for JAVA... " >&6; }
28894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28895$as_echo "disabled" >&6; }
28896      else
28897        # Check if the provided tool contains a complete path.
28898        tool_specified="$JAVA"
28899        tool_basename="${tool_specified##*/}"
28900        if test "x$tool_basename" = "x$tool_specified"; then
28901          # A command without a complete path is provided, search $PATH.
28902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28903$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28904          # Extract the first word of "$tool_basename", so it can be a program name with args.
28905set dummy $tool_basename; ac_word=$2
28906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28907$as_echo_n "checking for $ac_word... " >&6; }
28908if ${ac_cv_path_JAVA+:} false; then :
28909  $as_echo_n "(cached) " >&6
28910else
28911  case $JAVA in
28912  [\\/]* | ?:[\\/]*)
28913  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28914  ;;
28915  *)
28916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28917for as_dir in $PATH
28918do
28919  IFS=$as_save_IFS
28920  test -z "$as_dir" && as_dir=.
28921    for ac_exec_ext in '' $ac_executable_extensions; do
28922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28923    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28925    break 2
28926  fi
28927done
28928  done
28929IFS=$as_save_IFS
28930
28931  ;;
28932esac
28933fi
28934JAVA=$ac_cv_path_JAVA
28935if test -n "$JAVA"; then
28936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28937$as_echo "$JAVA" >&6; }
28938else
28939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28940$as_echo "no" >&6; }
28941fi
28942
28943
28944          if test "x$JAVA" = x; then
28945            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28946          fi
28947        else
28948          # Otherwise we believe it is a complete path. Use it as it is.
28949          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28950$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28951          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28952$as_echo_n "checking for JAVA... " >&6; }
28953          if test ! -x "$tool_specified"; then
28954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28955$as_echo "not found" >&6; }
28956            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28957          fi
28958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28959$as_echo "$tool_specified" >&6; }
28960        fi
28961      fi
28962    fi
28963
28964  fi
28965
28966
28967
28968  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28969
28970  # Publish this variable in the help.
28971
28972
28973  if [ -z "${JAVAC+x}" ]; then
28974    # The variable is not set by user, try to locate tool using the code snippet
28975
28976      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28977$as_echo_n "checking for javac in Boot JDK... " >&6; }
28978      JAVAC=$BOOT_JDK/bin/javac
28979      if test ! -x $JAVAC; then
28980        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28981$as_echo "not found" >&6; }
28982        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28983$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28984        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28985      fi
28986      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28987$as_echo "ok" >&6; }
28988
28989
28990  else
28991    # The variable is set, but is it from the command line or the environment?
28992
28993    # Try to remove the string !JAVAC! from our list.
28994    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
28995    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28996      # If it failed, the variable was not from the command line. Ignore it,
28997      # but warn the user (except for BASH, which is always set by the calling BASH).
28998      if test "xJAVAC" != xBASH; then
28999        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29000$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29001      fi
29002      # Try to locate tool using the code snippet
29003
29004      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29005$as_echo_n "checking for javac in Boot JDK... " >&6; }
29006      JAVAC=$BOOT_JDK/bin/javac
29007      if test ! -x $JAVAC; then
29008        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29009$as_echo "not found" >&6; }
29010        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29011$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29012        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29013      fi
29014      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29015$as_echo "ok" >&6; }
29016
29017
29018    else
29019      # If it succeeded, then it was overridden by the user. We will use it
29020      # for the tool.
29021
29022      # First remove it from the list of overridden variables, so we can test
29023      # for unknown variables in the end.
29024      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29025
29026      # Check if we try to supply an empty value
29027      if test "x$JAVAC" = x; then
29028        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29029$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29030        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29031$as_echo_n "checking for JAVAC... " >&6; }
29032        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29033$as_echo "disabled" >&6; }
29034      else
29035        # Check if the provided tool contains a complete path.
29036        tool_specified="$JAVAC"
29037        tool_basename="${tool_specified##*/}"
29038        if test "x$tool_basename" = "x$tool_specified"; then
29039          # A command without a complete path is provided, search $PATH.
29040          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29041$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29042          # Extract the first word of "$tool_basename", so it can be a program name with args.
29043set dummy $tool_basename; ac_word=$2
29044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29045$as_echo_n "checking for $ac_word... " >&6; }
29046if ${ac_cv_path_JAVAC+:} false; then :
29047  $as_echo_n "(cached) " >&6
29048else
29049  case $JAVAC in
29050  [\\/]* | ?:[\\/]*)
29051  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29052  ;;
29053  *)
29054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29055for as_dir in $PATH
29056do
29057  IFS=$as_save_IFS
29058  test -z "$as_dir" && as_dir=.
29059    for ac_exec_ext in '' $ac_executable_extensions; do
29060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29061    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29063    break 2
29064  fi
29065done
29066  done
29067IFS=$as_save_IFS
29068
29069  ;;
29070esac
29071fi
29072JAVAC=$ac_cv_path_JAVAC
29073if test -n "$JAVAC"; then
29074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29075$as_echo "$JAVAC" >&6; }
29076else
29077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29078$as_echo "no" >&6; }
29079fi
29080
29081
29082          if test "x$JAVAC" = x; then
29083            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29084          fi
29085        else
29086          # Otherwise we believe it is a complete path. Use it as it is.
29087          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29088$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29089          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29090$as_echo_n "checking for JAVAC... " >&6; }
29091          if test ! -x "$tool_specified"; then
29092            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29093$as_echo "not found" >&6; }
29094            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29095          fi
29096          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29097$as_echo "$tool_specified" >&6; }
29098        fi
29099      fi
29100    fi
29101
29102  fi
29103
29104
29105
29106  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29107
29108  # Publish this variable in the help.
29109
29110
29111  if [ -z "${JAVAH+x}" ]; then
29112    # The variable is not set by user, try to locate tool using the code snippet
29113
29114      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29115$as_echo_n "checking for javah in Boot JDK... " >&6; }
29116      JAVAH=$BOOT_JDK/bin/javah
29117      if test ! -x $JAVAH; then
29118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29119$as_echo "not found" >&6; }
29120        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29121$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29122        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29123      fi
29124      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29125$as_echo "ok" >&6; }
29126
29127
29128  else
29129    # The variable is set, but is it from the command line or the environment?
29130
29131    # Try to remove the string !JAVAH! from our list.
29132    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29133    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29134      # If it failed, the variable was not from the command line. Ignore it,
29135      # but warn the user (except for BASH, which is always set by the calling BASH).
29136      if test "xJAVAH" != xBASH; then
29137        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29138$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29139      fi
29140      # Try to locate tool using the code snippet
29141
29142      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29143$as_echo_n "checking for javah in Boot JDK... " >&6; }
29144      JAVAH=$BOOT_JDK/bin/javah
29145      if test ! -x $JAVAH; then
29146        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29147$as_echo "not found" >&6; }
29148        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29149$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29150        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29151      fi
29152      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29153$as_echo "ok" >&6; }
29154
29155
29156    else
29157      # If it succeeded, then it was overridden by the user. We will use it
29158      # for the tool.
29159
29160      # First remove it from the list of overridden variables, so we can test
29161      # for unknown variables in the end.
29162      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29163
29164      # Check if we try to supply an empty value
29165      if test "x$JAVAH" = x; then
29166        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29167$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29168        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29169$as_echo_n "checking for JAVAH... " >&6; }
29170        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29171$as_echo "disabled" >&6; }
29172      else
29173        # Check if the provided tool contains a complete path.
29174        tool_specified="$JAVAH"
29175        tool_basename="${tool_specified##*/}"
29176        if test "x$tool_basename" = "x$tool_specified"; then
29177          # A command without a complete path is provided, search $PATH.
29178          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29179$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29180          # Extract the first word of "$tool_basename", so it can be a program name with args.
29181set dummy $tool_basename; ac_word=$2
29182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29183$as_echo_n "checking for $ac_word... " >&6; }
29184if ${ac_cv_path_JAVAH+:} false; then :
29185  $as_echo_n "(cached) " >&6
29186else
29187  case $JAVAH in
29188  [\\/]* | ?:[\\/]*)
29189  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29190  ;;
29191  *)
29192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29193for as_dir in $PATH
29194do
29195  IFS=$as_save_IFS
29196  test -z "$as_dir" && as_dir=.
29197    for ac_exec_ext in '' $ac_executable_extensions; do
29198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29199    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29201    break 2
29202  fi
29203done
29204  done
29205IFS=$as_save_IFS
29206
29207  ;;
29208esac
29209fi
29210JAVAH=$ac_cv_path_JAVAH
29211if test -n "$JAVAH"; then
29212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29213$as_echo "$JAVAH" >&6; }
29214else
29215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29216$as_echo "no" >&6; }
29217fi
29218
29219
29220          if test "x$JAVAH" = x; then
29221            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29222          fi
29223        else
29224          # Otherwise we believe it is a complete path. Use it as it is.
29225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29226$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29227          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29228$as_echo_n "checking for JAVAH... " >&6; }
29229          if test ! -x "$tool_specified"; then
29230            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29231$as_echo "not found" >&6; }
29232            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29233          fi
29234          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29235$as_echo "$tool_specified" >&6; }
29236        fi
29237      fi
29238    fi
29239
29240  fi
29241
29242
29243
29244  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29245
29246  # Publish this variable in the help.
29247
29248
29249  if [ -z "${JAR+x}" ]; then
29250    # The variable is not set by user, try to locate tool using the code snippet
29251
29252      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29253$as_echo_n "checking for jar in Boot JDK... " >&6; }
29254      JAR=$BOOT_JDK/bin/jar
29255      if test ! -x $JAR; then
29256        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29257$as_echo "not found" >&6; }
29258        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29259$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29260        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29261      fi
29262      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29263$as_echo "ok" >&6; }
29264
29265
29266  else
29267    # The variable is set, but is it from the command line or the environment?
29268
29269    # Try to remove the string !JAR! from our list.
29270    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29271    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29272      # If it failed, the variable was not from the command line. Ignore it,
29273      # but warn the user (except for BASH, which is always set by the calling BASH).
29274      if test "xJAR" != xBASH; then
29275        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29276$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29277      fi
29278      # Try to locate tool using the code snippet
29279
29280      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29281$as_echo_n "checking for jar in Boot JDK... " >&6; }
29282      JAR=$BOOT_JDK/bin/jar
29283      if test ! -x $JAR; then
29284        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29285$as_echo "not found" >&6; }
29286        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29287$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29288        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29289      fi
29290      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29291$as_echo "ok" >&6; }
29292
29293
29294    else
29295      # If it succeeded, then it was overridden by the user. We will use it
29296      # for the tool.
29297
29298      # First remove it from the list of overridden variables, so we can test
29299      # for unknown variables in the end.
29300      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29301
29302      # Check if we try to supply an empty value
29303      if test "x$JAR" = x; then
29304        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29305$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29306        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29307$as_echo_n "checking for JAR... " >&6; }
29308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29309$as_echo "disabled" >&6; }
29310      else
29311        # Check if the provided tool contains a complete path.
29312        tool_specified="$JAR"
29313        tool_basename="${tool_specified##*/}"
29314        if test "x$tool_basename" = "x$tool_specified"; then
29315          # A command without a complete path is provided, search $PATH.
29316          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29317$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29318          # Extract the first word of "$tool_basename", so it can be a program name with args.
29319set dummy $tool_basename; ac_word=$2
29320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29321$as_echo_n "checking for $ac_word... " >&6; }
29322if ${ac_cv_path_JAR+:} false; then :
29323  $as_echo_n "(cached) " >&6
29324else
29325  case $JAR in
29326  [\\/]* | ?:[\\/]*)
29327  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29328  ;;
29329  *)
29330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29331for as_dir in $PATH
29332do
29333  IFS=$as_save_IFS
29334  test -z "$as_dir" && as_dir=.
29335    for ac_exec_ext in '' $ac_executable_extensions; do
29336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29337    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29339    break 2
29340  fi
29341done
29342  done
29343IFS=$as_save_IFS
29344
29345  ;;
29346esac
29347fi
29348JAR=$ac_cv_path_JAR
29349if test -n "$JAR"; then
29350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29351$as_echo "$JAR" >&6; }
29352else
29353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29354$as_echo "no" >&6; }
29355fi
29356
29357
29358          if test "x$JAR" = x; then
29359            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29360          fi
29361        else
29362          # Otherwise we believe it is a complete path. Use it as it is.
29363          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29364$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29365          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29366$as_echo_n "checking for JAR... " >&6; }
29367          if test ! -x "$tool_specified"; then
29368            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29369$as_echo "not found" >&6; }
29370            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29371          fi
29372          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29373$as_echo "$tool_specified" >&6; }
29374        fi
29375      fi
29376    fi
29377
29378  fi
29379
29380
29381
29382  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29383
29384  # Publish this variable in the help.
29385
29386
29387  if [ -z "${JARSIGNER+x}" ]; then
29388    # The variable is not set by user, try to locate tool using the code snippet
29389
29390      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29391$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29392      JARSIGNER=$BOOT_JDK/bin/jarsigner
29393      if test ! -x $JARSIGNER; then
29394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29395$as_echo "not found" >&6; }
29396        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29397$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29398        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29399      fi
29400      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29401$as_echo "ok" >&6; }
29402
29403
29404  else
29405    # The variable is set, but is it from the command line or the environment?
29406
29407    # Try to remove the string !JARSIGNER! from our list.
29408    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29409    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29410      # If it failed, the variable was not from the command line. Ignore it,
29411      # but warn the user (except for BASH, which is always set by the calling BASH).
29412      if test "xJARSIGNER" != xBASH; then
29413        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29414$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29415      fi
29416      # Try to locate tool using the code snippet
29417
29418      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29419$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29420      JARSIGNER=$BOOT_JDK/bin/jarsigner
29421      if test ! -x $JARSIGNER; then
29422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29423$as_echo "not found" >&6; }
29424        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29425$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29426        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29427      fi
29428      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29429$as_echo "ok" >&6; }
29430
29431
29432    else
29433      # If it succeeded, then it was overridden by the user. We will use it
29434      # for the tool.
29435
29436      # First remove it from the list of overridden variables, so we can test
29437      # for unknown variables in the end.
29438      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29439
29440      # Check if we try to supply an empty value
29441      if test "x$JARSIGNER" = x; then
29442        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29443$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29444        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29445$as_echo_n "checking for JARSIGNER... " >&6; }
29446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29447$as_echo "disabled" >&6; }
29448      else
29449        # Check if the provided tool contains a complete path.
29450        tool_specified="$JARSIGNER"
29451        tool_basename="${tool_specified##*/}"
29452        if test "x$tool_basename" = "x$tool_specified"; then
29453          # A command without a complete path is provided, search $PATH.
29454          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29455$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29456          # Extract the first word of "$tool_basename", so it can be a program name with args.
29457set dummy $tool_basename; ac_word=$2
29458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29459$as_echo_n "checking for $ac_word... " >&6; }
29460if ${ac_cv_path_JARSIGNER+:} false; then :
29461  $as_echo_n "(cached) " >&6
29462else
29463  case $JARSIGNER in
29464  [\\/]* | ?:[\\/]*)
29465  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29466  ;;
29467  *)
29468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29469for as_dir in $PATH
29470do
29471  IFS=$as_save_IFS
29472  test -z "$as_dir" && as_dir=.
29473    for ac_exec_ext in '' $ac_executable_extensions; do
29474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29475    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29477    break 2
29478  fi
29479done
29480  done
29481IFS=$as_save_IFS
29482
29483  ;;
29484esac
29485fi
29486JARSIGNER=$ac_cv_path_JARSIGNER
29487if test -n "$JARSIGNER"; then
29488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29489$as_echo "$JARSIGNER" >&6; }
29490else
29491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29492$as_echo "no" >&6; }
29493fi
29494
29495
29496          if test "x$JARSIGNER" = x; then
29497            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29498          fi
29499        else
29500          # Otherwise we believe it is a complete path. Use it as it is.
29501          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29502$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29503          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29504$as_echo_n "checking for JARSIGNER... " >&6; }
29505          if test ! -x "$tool_specified"; then
29506            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29507$as_echo "not found" >&6; }
29508            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29509          fi
29510          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29511$as_echo "$tool_specified" >&6; }
29512        fi
29513      fi
29514    fi
29515
29516  fi
29517
29518
29519
29520  # Finally, set some other options...
29521
29522  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29523  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29524
29525
29526
29527  # Check if the boot jdk is 32 or 64 bit
29528  if "$JAVA" -d64 -version > /dev/null 2>&1; then
29529    BOOT_JDK_BITS="64"
29530  else
29531    BOOT_JDK_BITS="32"
29532  fi
29533  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29534$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29536$as_echo "$BOOT_JDK_BITS" >&6; }
29537
29538
29539
29540###############################################################################
29541#
29542# Configure the sources to use. We can add or override individual directories.
29543#
29544###############################################################################
29545
29546
29547  # Where are the sources.
29548  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
29549  CORBA_TOPDIR="$SRC_ROOT/corba"
29550  JAXP_TOPDIR="$SRC_ROOT/jaxp"
29551  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
29552  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
29553  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
29554  JDK_TOPDIR="$SRC_ROOT/jdk"
29555
29556
29557
29558
29559
29560
29561
29562
29563
29564  # This feature is no longer supported.
29565
29566
29567
29568# Check whether --with-add-source-root was given.
29569if test "${with_add_source_root+set}" = set; then :
29570  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
29571$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
29572fi
29573
29574
29575
29576
29577# Check whether --with-override-source-root was given.
29578if test "${with_override_source_root+set}" = set; then :
29579  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
29580$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
29581fi
29582
29583
29584
29585
29586# Check whether --with-adds-and-overrides was given.
29587if test "${with_adds_and_overrides+set}" = set; then :
29588  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
29589$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
29590fi
29591
29592
29593
29594
29595# Check whether --with-override-langtools was given.
29596if test "${with_override_langtools+set}" = set; then :
29597  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
29598$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
29599fi
29600
29601
29602
29603
29604# Check whether --with-override-corba was given.
29605if test "${with_override_corba+set}" = set; then :
29606  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
29607$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
29608fi
29609
29610
29611
29612
29613# Check whether --with-override-jaxp was given.
29614if test "${with_override_jaxp+set}" = set; then :
29615  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
29616$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
29617fi
29618
29619
29620
29621
29622# Check whether --with-override-jaxws was given.
29623if test "${with_override_jaxws+set}" = set; then :
29624  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
29625$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
29626fi
29627
29628
29629
29630
29631# Check whether --with-override-hotspot was given.
29632if test "${with_override_hotspot+set}" = set; then :
29633  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29634$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29635fi
29636
29637
29638
29639
29640# Check whether --with-override-nashorn was given.
29641if test "${with_override_nashorn+set}" = set; then :
29642  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29643$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29644fi
29645
29646
29647
29648
29649# Check whether --with-override-jdk was given.
29650if test "${with_override_jdk+set}" = set; then :
29651  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29652$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29653fi
29654
29655
29656
29657
29658  BUILD_OUTPUT="$OUTPUT_ROOT"
29659
29660
29661  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29662  BUILD_HOTSPOT=true
29663
29664
29665
29666# Check whether --with-import-hotspot was given.
29667if test "${with_import_hotspot+set}" = set; then :
29668  withval=$with_import_hotspot;
29669fi
29670
29671  if test "x$with_import_hotspot" != x; then
29672    CURDIR="$PWD"
29673    cd "$with_import_hotspot"
29674    HOTSPOT_DIST="`pwd`"
29675    cd "$CURDIR"
29676    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29677      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29678    fi
29679    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29680$as_echo_n "checking if hotspot should be imported... " >&6; }
29681    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29682$as_echo "yes from $HOTSPOT_DIST" >&6; }
29683    BUILD_HOTSPOT=false
29684  fi
29685
29686  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29687
29688
29689###############################################################################
29690#
29691# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29692# native code.
29693#
29694###############################################################################
29695
29696# See if we are doing a complete static build or not
29697
29698  # Check whether --enable-static-build was given.
29699if test "${enable_static_build+set}" = set; then :
29700  enableval=$enable_static_build;
29701fi
29702
29703  STATIC_BUILD=false
29704  if test "x$enable_static_build" = "xyes"; then
29705    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29706$as_echo_n "checking if static build is enabled... " >&6; }
29707    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29708$as_echo "yes" >&6; }
29709    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29710      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29711    fi
29712    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29713    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29714    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29715    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29716    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29717    STATIC_BUILD=true
29718  elif test "x$enable_static_build" = "xno"; then
29719    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29720$as_echo_n "checking if static build is enabled... " >&6; }
29721    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29722$as_echo "no" >&6; }
29723  elif test "x$enable_static_build" != "x"; then
29724    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29725  fi
29726
29727
29728
29729
29730# First determine the toolchain type (compiler family)
29731
29732
29733# Check whether --with-toolchain-type was given.
29734if test "${with_toolchain_type+set}" = set; then :
29735  withval=$with_toolchain_type;
29736fi
29737
29738
29739  # Use indirect variable referencing
29740  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29741  VALID_TOOLCHAINS=${!toolchain_var_name}
29742
29743  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29744    if test -n "$XCODEBUILD"; then
29745      # On Mac OS X, default toolchain to clang after Xcode 5
29746      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29747      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29748      if test $? -ne 0; then
29749        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29750      fi
29751      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29752          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29753          $CUT -f 1 -d .`
29754      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29755$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29756      if test $XCODE_MAJOR_VERSION -ge 5; then
29757          DEFAULT_TOOLCHAIN="clang"
29758      else
29759          DEFAULT_TOOLCHAIN="gcc"
29760      fi
29761    else
29762      # If Xcode is not installed, but the command line tools are
29763      # then we can't run xcodebuild. On these systems we should
29764      # default to clang
29765      DEFAULT_TOOLCHAIN="clang"
29766    fi
29767  else
29768    # First toolchain type in the list is the default
29769    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29770  fi
29771
29772  if test "x$with_toolchain_type" = xlist; then
29773    # List all toolchains
29774    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29775$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29776    for toolchain in $VALID_TOOLCHAINS; do
29777      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29778      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29779      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29780    done
29781
29782    exit 0
29783  elif test "x$with_toolchain_type" != x; then
29784    # User override; check that it is valid
29785    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29786      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29787$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29788      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29789$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29790      as_fn_error $? "Cannot continue." "$LINENO" 5
29791    fi
29792    TOOLCHAIN_TYPE=$with_toolchain_type
29793  else
29794    # No flag given, use default
29795    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29796  fi
29797
29798
29799  TOOLCHAIN_CC_BINARY_clang="clang"
29800  TOOLCHAIN_CC_BINARY_gcc="gcc"
29801  TOOLCHAIN_CC_BINARY_microsoft="cl"
29802  TOOLCHAIN_CC_BINARY_solstudio="cc"
29803  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29804
29805  TOOLCHAIN_CXX_BINARY_clang="clang++"
29806  TOOLCHAIN_CXX_BINARY_gcc="g++"
29807  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29808  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29809  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29810
29811  # Use indirect variable referencing
29812  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29813  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29814  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29815  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29816  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29817  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29818
29819
29820  # Define filename patterns
29821  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29822    LIBRARY_PREFIX=
29823    SHARED_LIBRARY_SUFFIX='.dll'
29824    STATIC_LIBRARY_SUFFIX='.lib'
29825    SHARED_LIBRARY='$1.dll'
29826    STATIC_LIBRARY='$1.lib'
29827    OBJ_SUFFIX='.obj'
29828    EXE_SUFFIX='.exe'
29829  else
29830    LIBRARY_PREFIX=lib
29831    SHARED_LIBRARY_SUFFIX='.so'
29832    STATIC_LIBRARY_SUFFIX='.a'
29833    SHARED_LIBRARY='lib$1.so'
29834    STATIC_LIBRARY='lib$1.a'
29835    OBJ_SUFFIX='.o'
29836    EXE_SUFFIX=''
29837    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29838      # For full static builds, we're overloading the SHARED_LIBRARY
29839      # variables in order to limit the amount of changes required.
29840      # It would be better to remove SHARED and just use LIBRARY and
29841      # LIBRARY_SUFFIX for libraries that can be built either
29842      # shared or static and use STATIC_* for libraries that are
29843      # always built statically.
29844      if test "x$STATIC_BUILD" = xtrue; then
29845        SHARED_LIBRARY='lib$1.a'
29846        SHARED_LIBRARY_SUFFIX='.a'
29847      else
29848        SHARED_LIBRARY='lib$1.dylib'
29849        SHARED_LIBRARY_SUFFIX='.dylib'
29850      fi
29851    fi
29852  fi
29853
29854
29855
29856
29857
29858
29859
29860
29861
29862
29863  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29864    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29865$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29866  else
29867    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29868$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29869  fi
29870
29871
29872# User supplied flags should be used when configure detects compilers
29873
29874  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29875    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29876$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29877  fi
29878
29879  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29880    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29881$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29882  fi
29883
29884  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29885    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29886$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29887  fi
29888
29889
29890# Check whether --with-extra-cflags was given.
29891if test "${with_extra_cflags+set}" = set; then :
29892  withval=$with_extra_cflags;
29893fi
29894
29895
29896
29897# Check whether --with-extra-cxxflags was given.
29898if test "${with_extra_cxxflags+set}" = set; then :
29899  withval=$with_extra_cxxflags;
29900fi
29901
29902
29903
29904# Check whether --with-extra-ldflags was given.
29905if test "${with_extra_ldflags+set}" = set; then :
29906  withval=$with_extra_ldflags;
29907fi
29908
29909
29910  EXTRA_CFLAGS="$with_extra_cflags"
29911  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29912  EXTRA_LDFLAGS="$with_extra_ldflags"
29913
29914  # Hotspot needs these set in their legacy form
29915  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29916  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29917  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29918
29919
29920
29921
29922
29923  # The global CFLAGS and LDLAGS variables are used by configure tests and
29924  # should include the extra parameters
29925  CFLAGS="$EXTRA_CFLAGS"
29926  CXXFLAGS="$EXTRA_CXXFLAGS"
29927  LDFLAGS="$EXTRA_LDFLAGS"
29928  CPPFLAGS=""
29929
29930# The sysroot cflags are needed for configure to be able to run the compilers
29931
29932  if test "x$SYSROOT" != "x"; then
29933    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29934      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29935        # Solaris Studio does not have a concept of sysroot. Instead we must
29936        # make sure the default include and lib dirs are appended to each
29937        # compile and link command line.
29938        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29939        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29940            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29941            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29942      fi
29943    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29944      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29945      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29946    elif test "x$TOOLCHAIN_TYPE" = xclang; then
29947      SYSROOT_CFLAGS="-isysroot $SYSROOT"
29948      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29949    fi
29950    # Propagate the sysroot args to hotspot
29951    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29952    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29953    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29954    # The global CFLAGS and LDFLAGS variables need these for configure to function
29955    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29956    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29957    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29958    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29959  fi
29960
29961  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29962    # We also need -iframework<path>/System/Library/Frameworks
29963    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29964    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29965    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
29966    # set this here so it doesn't have to be peppered throughout the forest
29967    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29968    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29969  fi
29970
29971
29972
29973
29974
29975# Then detect the actual binaries needed
29976
29977  # FIXME: Is this needed?
29978  ac_ext=cpp
29979ac_cpp='$CXXCPP $CPPFLAGS'
29980ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29981ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29982ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29983
29984
29985  # Store the CFLAGS etc passed to the configure script.
29986  ORG_CFLAGS="$CFLAGS"
29987  ORG_CXXFLAGS="$CXXFLAGS"
29988
29989  # autoconf magic only relies on PATH, so update it if tools dir is specified
29990  OLD_PATH="$PATH"
29991
29992  # On Windows, we need to detect the visual studio installation first.
29993  # This will change the PATH, but we need to keep that new PATH even
29994  # after toolchain detection is done, since the compiler (on x86) uses
29995  # it for DLL resolution in runtime.
29996  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
29997      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
29998
29999  # Store path to cygwin link.exe to help excluding it when searching for
30000  # VS linker. This must be done before changing the PATH when looking for VS.
30001  # Extract the first word of "link", so it can be a program name with args.
30002set dummy link; ac_word=$2
30003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30004$as_echo_n "checking for $ac_word... " >&6; }
30005if ${ac_cv_path_CYGWIN_LINK+:} false; then :
30006  $as_echo_n "(cached) " >&6
30007else
30008  case $CYGWIN_LINK in
30009  [\\/]* | ?:[\\/]*)
30010  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
30011  ;;
30012  *)
30013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30014for as_dir in $PATH
30015do
30016  IFS=$as_save_IFS
30017  test -z "$as_dir" && as_dir=.
30018    for ac_exec_ext in '' $ac_executable_extensions; do
30019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30020    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
30021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30022    break 2
30023  fi
30024done
30025  done
30026IFS=$as_save_IFS
30027
30028  ;;
30029esac
30030fi
30031CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
30032if test -n "$CYGWIN_LINK"; then
30033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
30034$as_echo "$CYGWIN_LINK" >&6; }
30035else
30036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30037$as_echo "no" >&6; }
30038fi
30039
30040
30041  if test "x$CYGWIN_LINK" != x; then
30042    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
30043$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
30044    "$CYGWIN_LINK" --version > /dev/null
30045    if test $? -eq 0 ; then
30046      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30047$as_echo "yes" >&6; }
30048    else
30049      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30050$as_echo "no" >&6; }
30051      # This might be the VS linker. Don't exclude it later on.
30052      CYGWIN_LINK=""
30053    fi
30054  fi
30055
30056  # First-hand choice is to locate and run the vsvars bat file.
30057
30058
30059# Check whether --with-toolchain-version was given.
30060if test "${with_toolchain_version+set}" = set; then :
30061  withval=$with_toolchain_version;
30062fi
30063
30064
30065  if test "x$with_toolchain_version" = xlist; then
30066    # List all toolchains
30067    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
30068$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
30069    for version in $VALID_VS_VERSIONS; do
30070      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
30071      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
30072    done
30073
30074    exit 0
30075  elif test "x$DEVKIT_VS_VERSION" != x; then
30076    VS_VERSION=$DEVKIT_VS_VERSION
30077    TOOLCHAIN_VERSION=$VS_VERSION
30078    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30079    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30080    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30081    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30082    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30083    VS_PATH="$TOOLCHAIN_PATH:$PATH"
30084
30085    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
30086    # can still be exported as INCLUDE for compiler invocations without
30087    # SYSROOT_CFLAGS
30088    OLDIFS="$IFS"
30089    IFS=";"
30090    for i in $DEVKIT_VS_INCLUDE; do
30091      ipath=$i
30092
30093  unix_path="$ipath"
30094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30095    windows_path=`$CYGPATH -m "$unix_path"`
30096    ipath="$windows_path"
30097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30098    windows_path=`cmd //c echo $unix_path`
30099    ipath="$windows_path"
30100  fi
30101
30102      VS_INCLUDE="$VS_INCLUDE;$ipath"
30103    done
30104    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
30105    # as LIB for compiler invocations without SYSROOT_LDFLAGS
30106    for i in $DEVKIT_VS_LIB; do
30107      libpath=$i
30108
30109  unix_path="$libpath"
30110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30111    windows_path=`$CYGPATH -m "$unix_path"`
30112    libpath="$windows_path"
30113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30114    windows_path=`cmd //c echo $unix_path`
30115    libpath="$windows_path"
30116  fi
30117
30118      VS_LIB="$VS_LIB;$libpath"
30119    done
30120    IFS="$OLDIFS"
30121
30122    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
30123$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
30124
30125  elif test "x$with_toolchain_version" != x; then
30126    # User override; check that it is valid
30127    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
30128      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
30129$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
30130      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
30131$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
30132      as_fn_error $? "Cannot continue." "$LINENO" 5
30133    fi
30134    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
30135  else
30136    # No flag given, use default
30137    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
30138  fi
30139
30140  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
30141
30142  VS_VERSION="$VS_VERSION"
30143  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
30144  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
30145  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
30146  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
30147
30148  # When using --with-tools-dir, assume it points to the correct and default
30149  # version of Visual Studio or that --with-toolchain-version was also set.
30150  if test "x$with_tools_dir" != x; then
30151
30152  if test "x$VS_ENV_CMD" = x; then
30153    VS_VERSION="${VS_VERSION}"
30154    VS_BASE="$with_tools_dir/../.."
30155    METHOD="--with-tools-dir"
30156
30157    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30158      VCVARSFILE="vc/bin/vcvars32.bat"
30159    else
30160      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30161    fi
30162
30163
30164  windows_path="$VS_BASE"
30165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30166    unix_path=`$CYGPATH -u "$windows_path"`
30167    VS_BASE="$unix_path"
30168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30170    VS_BASE="$unix_path"
30171  fi
30172
30173    if test -d "$VS_BASE"; then
30174      if test -f "$VS_BASE/$VCVARSFILE"; then
30175        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30176$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30177        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30178        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30179        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30180        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30181      else
30182        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30183$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30184        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30185$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30186      fi
30187    fi
30188  fi
30189
30190
30191  if test "x$VS_ENV_CMD" = x; then
30192    VS_VERSION="${VS_VERSION}"
30193    VS_BASE="$with_tools_dir/../../.."
30194    METHOD="--with-tools-dir"
30195
30196    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30197      VCVARSFILE="vc/bin/vcvars32.bat"
30198    else
30199      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30200    fi
30201
30202
30203  windows_path="$VS_BASE"
30204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30205    unix_path=`$CYGPATH -u "$windows_path"`
30206    VS_BASE="$unix_path"
30207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30209    VS_BASE="$unix_path"
30210  fi
30211
30212    if test -d "$VS_BASE"; then
30213      if test -f "$VS_BASE/$VCVARSFILE"; then
30214        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30215$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30216        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30217        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30218        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30219        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30220      else
30221        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30222$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30223        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30224$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30225      fi
30226    fi
30227  fi
30228
30229    if test "x$VS_ENV_CMD" = x; then
30230      # Having specified an argument which is incorrect will produce an instant failure;
30231      # we should not go on looking
30232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
30233$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
30234      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
30235$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
30236      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
30237$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
30238      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
30239    fi
30240  fi
30241
30242  VS_ENV_CMD=""
30243  VS_ENV_ARGS=""
30244
30245  if test "x$VS_COMNTOOLS" != x; then
30246
30247  if test "x$VS_ENV_CMD" = x; then
30248    VS_VERSION="${VS_VERSION}"
30249    VS_BASE="$VS_COMNTOOLS/../.."
30250    METHOD="$VS_COMNTOOLS_VAR variable"
30251
30252    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30253      VCVARSFILE="vc/bin/vcvars32.bat"
30254    else
30255      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30256    fi
30257
30258
30259  windows_path="$VS_BASE"
30260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30261    unix_path=`$CYGPATH -u "$windows_path"`
30262    VS_BASE="$unix_path"
30263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30265    VS_BASE="$unix_path"
30266  fi
30267
30268    if test -d "$VS_BASE"; then
30269      if test -f "$VS_BASE/$VCVARSFILE"; then
30270        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30271$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30272        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30273        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30274        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30275        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30276      else
30277        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30278$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30279        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30280$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30281      fi
30282    fi
30283  fi
30284
30285  fi
30286  if test "x$PROGRAMFILES" != x; then
30287
30288  if test "x$VS_ENV_CMD" = x; then
30289    VS_VERSION="${VS_VERSION}"
30290    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
30291    METHOD="well-known name"
30292
30293    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30294      VCVARSFILE="vc/bin/vcvars32.bat"
30295    else
30296      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30297    fi
30298
30299
30300  windows_path="$VS_BASE"
30301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30302    unix_path=`$CYGPATH -u "$windows_path"`
30303    VS_BASE="$unix_path"
30304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30306    VS_BASE="$unix_path"
30307  fi
30308
30309    if test -d "$VS_BASE"; then
30310      if test -f "$VS_BASE/$VCVARSFILE"; then
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        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30314        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30315        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30316        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30317      else
30318        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30319$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30320        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30321$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30322      fi
30323    fi
30324  fi
30325
30326  fi
30327  # Work around the insanely named ProgramFiles(x86) env variable
30328  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
30329  if test "x$PROGRAMFILES_X86" != x; then
30330
30331  if test "x$VS_ENV_CMD" = x; then
30332    VS_VERSION="${VS_VERSION}"
30333    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
30334    METHOD="well-known name"
30335
30336    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30337      VCVARSFILE="vc/bin/vcvars32.bat"
30338    else
30339      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30340    fi
30341
30342
30343  windows_path="$VS_BASE"
30344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30345    unix_path=`$CYGPATH -u "$windows_path"`
30346    VS_BASE="$unix_path"
30347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30349    VS_BASE="$unix_path"
30350  fi
30351
30352    if test -d "$VS_BASE"; then
30353      if test -f "$VS_BASE/$VCVARSFILE"; then
30354        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30355$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30356        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30357        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30358        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30359        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30360      else
30361        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30362$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30363        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30364$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30365      fi
30366    fi
30367  fi
30368
30369  fi
30370
30371  if test "x$VS_ENV_CMD" = x; then
30372    VS_VERSION="${VS_VERSION}"
30373    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
30374    METHOD="well-known name"
30375
30376    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30377      VCVARSFILE="vc/bin/vcvars32.bat"
30378    else
30379      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30380    fi
30381
30382
30383  windows_path="$VS_BASE"
30384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30385    unix_path=`$CYGPATH -u "$windows_path"`
30386    VS_BASE="$unix_path"
30387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30389    VS_BASE="$unix_path"
30390  fi
30391
30392    if test -d "$VS_BASE"; then
30393      if test -f "$VS_BASE/$VCVARSFILE"; then
30394        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30395$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30396        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30397        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30398        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30399        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30400      else
30401        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30402$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30403        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30404$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30405      fi
30406    fi
30407  fi
30408
30409
30410  if test "x$VS_ENV_CMD" = x; then
30411    VS_VERSION="${VS_VERSION}"
30412    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
30413    METHOD="well-known name"
30414
30415    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30416      VCVARSFILE="vc/bin/vcvars32.bat"
30417    else
30418      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30419    fi
30420
30421
30422  windows_path="$VS_BASE"
30423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30424    unix_path=`$CYGPATH -u "$windows_path"`
30425    VS_BASE="$unix_path"
30426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30428    VS_BASE="$unix_path"
30429  fi
30430
30431    if test -d "$VS_BASE"; then
30432      if test -f "$VS_BASE/$VCVARSFILE"; then
30433        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30434$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30435        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30436        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30437        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30438        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30439      else
30440        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30441$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30442        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30443$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30444      fi
30445    fi
30446  fi
30447
30448
30449  if test "x$SDK_INSTALL_DIR" != x; then
30450    if test "x$ProgramW6432" != x; then
30451
30452  if test "x$VS_ENV_CMD" = x; then
30453    VS_VERSION="${VS_VERSION}"
30454    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
30455    METHOD="well-known name"
30456
30457  windows_path="$WIN_SDK_BASE"
30458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30459    unix_path=`$CYGPATH -u "$windows_path"`
30460    WIN_SDK_BASE="$unix_path"
30461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30463    WIN_SDK_BASE="$unix_path"
30464  fi
30465
30466    if test -d "$WIN_SDK_BASE"; then
30467      # There have been cases of partial or broken SDK installations. A missing
30468      # lib dir is not going to work.
30469      if test ! -d "$WIN_SDK_BASE/lib"; then
30470        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30471$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30472        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30473$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30474      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30475        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30476$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30477        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30478        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30479          VS_ENV_ARGS="/x86"
30480        else
30481          VS_ENV_ARGS="/x64"
30482        fi
30483        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30484        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30485        # TODO: improve detection for other versions of SDK
30486        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30487      else
30488        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30489$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30490        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30491$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30492      fi
30493    fi
30494  fi
30495
30496    fi
30497    if test "x$PROGRAMW6432" != x; then
30498
30499  if test "x$VS_ENV_CMD" = x; then
30500    VS_VERSION="${VS_VERSION}"
30501    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
30502    METHOD="well-known name"
30503
30504  windows_path="$WIN_SDK_BASE"
30505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30506    unix_path=`$CYGPATH -u "$windows_path"`
30507    WIN_SDK_BASE="$unix_path"
30508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30510    WIN_SDK_BASE="$unix_path"
30511  fi
30512
30513    if test -d "$WIN_SDK_BASE"; then
30514      # There have been cases of partial or broken SDK installations. A missing
30515      # lib dir is not going to work.
30516      if test ! -d "$WIN_SDK_BASE/lib"; then
30517        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30518$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30519        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30520$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30521      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
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        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30525        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30526          VS_ENV_ARGS="/x86"
30527        else
30528          VS_ENV_ARGS="/x64"
30529        fi
30530        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30531        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30532        # TODO: improve detection for other versions of SDK
30533        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30534      else
30535        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30536$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30537        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30538$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30539      fi
30540    fi
30541  fi
30542
30543    fi
30544    if test "x$PROGRAMFILES" != x; then
30545
30546  if test "x$VS_ENV_CMD" = x; then
30547    VS_VERSION="${VS_VERSION}"
30548    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
30549    METHOD="well-known name"
30550
30551  windows_path="$WIN_SDK_BASE"
30552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30553    unix_path=`$CYGPATH -u "$windows_path"`
30554    WIN_SDK_BASE="$unix_path"
30555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30557    WIN_SDK_BASE="$unix_path"
30558  fi
30559
30560    if test -d "$WIN_SDK_BASE"; then
30561      # There have been cases of partial or broken SDK installations. A missing
30562      # lib dir is not going to work.
30563      if test ! -d "$WIN_SDK_BASE/lib"; then
30564        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30565$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30566        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30567$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30568      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
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        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30572        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30573          VS_ENV_ARGS="/x86"
30574        else
30575          VS_ENV_ARGS="/x64"
30576        fi
30577        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30578        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30579        # TODO: improve detection for other versions of SDK
30580        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30581      else
30582        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30583$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30584        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30585$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30586      fi
30587    fi
30588  fi
30589
30590    fi
30591
30592  if test "x$VS_ENV_CMD" = x; then
30593    VS_VERSION="${VS_VERSION}"
30594    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
30595    METHOD="well-known name"
30596
30597  windows_path="$WIN_SDK_BASE"
30598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30599    unix_path=`$CYGPATH -u "$windows_path"`
30600    WIN_SDK_BASE="$unix_path"
30601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30603    WIN_SDK_BASE="$unix_path"
30604  fi
30605
30606    if test -d "$WIN_SDK_BASE"; then
30607      # There have been cases of partial or broken SDK installations. A missing
30608      # lib dir is not going to work.
30609      if test ! -d "$WIN_SDK_BASE/lib"; then
30610        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30611$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30612        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30613$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30614      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30615        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30616$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30617        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30618        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30619          VS_ENV_ARGS="/x86"
30620        else
30621          VS_ENV_ARGS="/x64"
30622        fi
30623        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30624        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30625        # TODO: improve detection for other versions of SDK
30626        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30627      else
30628        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30629$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30630        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30631$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30632      fi
30633    fi
30634  fi
30635
30636
30637  if test "x$VS_ENV_CMD" = x; then
30638    VS_VERSION="${VS_VERSION}"
30639    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30640    METHOD="well-known name"
30641
30642  windows_path="$WIN_SDK_BASE"
30643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30644    unix_path=`$CYGPATH -u "$windows_path"`
30645    WIN_SDK_BASE="$unix_path"
30646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30648    WIN_SDK_BASE="$unix_path"
30649  fi
30650
30651    if test -d "$WIN_SDK_BASE"; then
30652      # There have been cases of partial or broken SDK installations. A missing
30653      # lib dir is not going to work.
30654      if test ! -d "$WIN_SDK_BASE/lib"; then
30655        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30656$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30657        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30658$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30659      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30660        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30661$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30662        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30663        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30664          VS_ENV_ARGS="/x86"
30665        else
30666          VS_ENV_ARGS="/x64"
30667        fi
30668        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30669        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30670        # TODO: improve detection for other versions of SDK
30671        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30672      else
30673        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30674$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30675        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30676$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30677      fi
30678    fi
30679  fi
30680
30681  fi
30682
30683    if test "x$VS_ENV_CMD" != x; then
30684      TOOLCHAIN_VERSION=$VS_VERSION
30685      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30686      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30687      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30688      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30689      # The rest of the variables are already evaled while probing
30690      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30691$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30692      break
30693    fi
30694  done
30695
30696
30697  # If we have a devkit, skip all of the below.
30698  if test "x$DEVKIT_VS_VERSION" = x; then
30699    if test "x$VS_ENV_CMD" != x; then
30700      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30701
30702  # Only process if variable expands to non-empty
30703
30704  if test "x$VS_ENV_CMD" != x; then
30705    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30706
30707  # First separate the path from the arguments. This will split at the first
30708  # space.
30709  complete="$VS_ENV_CMD"
30710  path="${complete%% *}"
30711  tmp="$complete EOL"
30712  arguments="${tmp#* }"
30713
30714  # Input might be given as Windows format, start by converting to
30715  # unix format.
30716  new_path=`$CYGPATH -u "$path"`
30717
30718  # Now try to locate executable using which
30719  new_path=`$WHICH "$new_path" 2> /dev/null`
30720  # bat and cmd files are not always considered executable in cygwin causing which
30721  # to not find them
30722  if test "x$new_path" = x \
30723      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30724      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30725    new_path=`$CYGPATH -u "$path"`
30726  fi
30727  if test "x$new_path" = x; then
30728    # Oops. Which didn't find the executable.
30729    # The splitting of arguments from the executable at a space might have been incorrect,
30730    # since paths with space are more likely in Windows. Give it another try with the whole
30731    # argument.
30732    path="$complete"
30733    arguments="EOL"
30734    new_path=`$CYGPATH -u "$path"`
30735    new_path=`$WHICH "$new_path" 2> /dev/null`
30736    # bat and cmd files are not always considered executable in cygwin causing which
30737    # to not find them
30738    if test "x$new_path" = x \
30739        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30740        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30741      new_path=`$CYGPATH -u "$path"`
30742    fi
30743    if test "x$new_path" = x; then
30744      # It's still not found. Now this is an unrecoverable error.
30745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30746$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30747      has_space=`$ECHO "$complete" | $GREP " "`
30748      if test "x$has_space" != x; then
30749        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30750$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30751      fi
30752      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30753    fi
30754  fi
30755
30756  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30757  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30758  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30759  # "foo.exe" is OK but "foo" is an error.
30760  #
30761  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30762  # It is also a way to make sure we got the proper file name for the real test later on.
30763  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30764  if test "x$test_shortpath" = x; then
30765    # Short path failed, file does not exist as specified.
30766    # Try adding .exe or .cmd
30767    if test -f "${new_path}.exe"; then
30768      input_to_shortpath="${new_path}.exe"
30769    elif test -f "${new_path}.cmd"; then
30770      input_to_shortpath="${new_path}.cmd"
30771    else
30772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30773$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30774      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30775$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30776      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30777    fi
30778  else
30779    input_to_shortpath="$new_path"
30780  fi
30781
30782  # Call helper function which possibly converts this using DOS-style short mode.
30783  # If so, the updated path is stored in $new_path.
30784  new_path="$input_to_shortpath"
30785
30786  input_path="$input_to_shortpath"
30787  # Check if we need to convert this using DOS-style short mode. If the path
30788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30789  # take no chances and rewrite it.
30790  # Note: m4 eats our [], so we need to use [ and ] instead.
30791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30792  if test "x$has_forbidden_chars" != x; then
30793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30794    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30795    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30796    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30797      # Going to short mode and back again did indeed matter. Since short mode is
30798      # case insensitive, let's make it lowercase to improve readability.
30799      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30800      # Now convert it back to Unix-style (cygpath)
30801      input_path=`$CYGPATH -u "$shortmode_path"`
30802      new_path="$input_path"
30803    fi
30804  fi
30805
30806  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30807  if test "x$test_cygdrive_prefix" = x; then
30808    # As a simple fix, exclude /usr/bin since it's not a real path.
30809    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30810      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30811      # a path prefixed by /cygdrive for fixpath to work.
30812      new_path="$CYGWIN_ROOT_PATH$input_path"
30813    fi
30814  fi
30815
30816  # remove trailing .exe if any
30817  new_path="${new_path/%.exe/}"
30818
30819    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30820
30821  # First separate the path from the arguments. This will split at the first
30822  # space.
30823  complete="$VS_ENV_CMD"
30824  path="${complete%% *}"
30825  tmp="$complete EOL"
30826  arguments="${tmp#* }"
30827
30828  # Input might be given as Windows format, start by converting to
30829  # unix format.
30830  new_path="$path"
30831
30832  windows_path="$new_path"
30833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30834    unix_path=`$CYGPATH -u "$windows_path"`
30835    new_path="$unix_path"
30836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30838    new_path="$unix_path"
30839  fi
30840
30841
30842  # Now try to locate executable using which
30843  new_path=`$WHICH "$new_path" 2> /dev/null`
30844
30845  if test "x$new_path" = x; then
30846    # Oops. Which didn't find the executable.
30847    # The splitting of arguments from the executable at a space might have been incorrect,
30848    # since paths with space are more likely in Windows. Give it another try with the whole
30849    # argument.
30850    path="$complete"
30851    arguments="EOL"
30852    new_path="$path"
30853
30854  windows_path="$new_path"
30855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30856    unix_path=`$CYGPATH -u "$windows_path"`
30857    new_path="$unix_path"
30858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30860    new_path="$unix_path"
30861  fi
30862
30863
30864    new_path=`$WHICH "$new_path" 2> /dev/null`
30865    # bat and cmd files are not always considered executable in MSYS causing which
30866    # to not find them
30867    if test "x$new_path" = x \
30868        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30869        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30870      new_path="$path"
30871
30872  windows_path="$new_path"
30873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30874    unix_path=`$CYGPATH -u "$windows_path"`
30875    new_path="$unix_path"
30876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30878    new_path="$unix_path"
30879  fi
30880
30881    fi
30882
30883    if test "x$new_path" = x; then
30884      # It's still not found. Now this is an unrecoverable error.
30885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30886$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30887      has_space=`$ECHO "$complete" | $GREP " "`
30888      if test "x$has_space" != x; then
30889        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30890$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30891      fi
30892      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30893    fi
30894  fi
30895
30896  # Now new_path has a complete unix path to the binary
30897  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30898    # Keep paths in /bin as-is, but remove trailing .exe if any
30899    new_path="${new_path/%.exe/}"
30900    # Do not save /bin paths to all_fixpath_prefixes!
30901  else
30902    # Not in mixed or Windows style, start by that.
30903    new_path=`cmd //c echo $new_path`
30904
30905  input_path="$new_path"
30906  # Check if we need to convert this using DOS-style short mode. If the path
30907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30908  # take no chances and rewrite it.
30909  # Note: m4 eats our [], so we need to use [ and ] instead.
30910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30911  if test "x$has_forbidden_chars" != x; then
30912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30914  fi
30915
30916    # Output is in $new_path
30917
30918  windows_path="$new_path"
30919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30920    unix_path=`$CYGPATH -u "$windows_path"`
30921    new_path="$unix_path"
30922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30924    new_path="$unix_path"
30925  fi
30926
30927    # remove trailing .exe if any
30928    new_path="${new_path/%.exe/}"
30929
30930    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30931    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30932  fi
30933
30934    else
30935      # We're on a unix platform. Hooray! :)
30936      # First separate the path from the arguments. This will split at the first
30937      # space.
30938      complete="$VS_ENV_CMD"
30939      path="${complete%% *}"
30940      tmp="$complete EOL"
30941      arguments="${tmp#* }"
30942
30943      # Cannot rely on the command "which" here since it doesn't always work.
30944      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30945      if test -z "$is_absolute_path"; then
30946        # Path to executable is not absolute. Find it.
30947        IFS_save="$IFS"
30948        IFS=:
30949        for p in $PATH; do
30950          if test -f "$p/$path" && test -x "$p/$path"; then
30951            new_path="$p/$path"
30952            break
30953          fi
30954        done
30955        IFS="$IFS_save"
30956      else
30957        # This is an absolute path, we can use it without further modifications.
30958        new_path="$path"
30959      fi
30960
30961      if test "x$new_path" = x; then
30962        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30963$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30964        has_space=`$ECHO "$complete" | $GREP " "`
30965        if test "x$has_space" != x; then
30966          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30967$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30968        fi
30969        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30970      fi
30971    fi
30972
30973    # Now join together the path and the arguments once again
30974    if test "x$arguments" != xEOL; then
30975      new_complete="$new_path ${arguments% *}"
30976    else
30977      new_complete="$new_path"
30978    fi
30979
30980    if test "x$complete" != "x$new_complete"; then
30981      VS_ENV_CMD="$new_complete"
30982      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
30983$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
30984    fi
30985  fi
30986
30987
30988      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
30989      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
30990$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
30991
30992      # We need to create a couple of temporary files.
30993      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
30994      $MKDIR -p $VS_ENV_TMP_DIR
30995
30996      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
30997      # Instead create a shell script which will set the relevant variables when run.
30998      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
30999
31000  unix_path="$WINPATH_VS_ENV_CMD"
31001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31002    windows_path=`$CYGPATH -m "$unix_path"`
31003    WINPATH_VS_ENV_CMD="$windows_path"
31004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31005    windows_path=`cmd //c echo $unix_path`
31006    WINPATH_VS_ENV_CMD="$windows_path"
31007  fi
31008
31009      WINPATH_BASH="$BASH"
31010
31011  unix_path="$WINPATH_BASH"
31012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31013    windows_path=`$CYGPATH -m "$unix_path"`
31014    WINPATH_BASH="$windows_path"
31015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31016    windows_path=`cmd //c echo $unix_path`
31017    WINPATH_BASH="$windows_path"
31018  fi
31019
31020
31021      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
31022      # script (executable by bash) that will setup the important variables.
31023      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
31024      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
31025      # This will end up something like:
31026      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
31027      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
31028      # These will end up something like:
31029      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
31030      # The trailing space for everyone except PATH is no typo, but is needed due
31031      # to trailing \ in the Windows paths. These will be stripped later.
31032      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
31033          >> $EXTRACT_VC_ENV_BAT_FILE
31034      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
31035          >> $EXTRACT_VC_ENV_BAT_FILE
31036      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
31037          >> $EXTRACT_VC_ENV_BAT_FILE
31038      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
31039          >> $EXTRACT_VC_ENV_BAT_FILE
31040      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
31041          >> $EXTRACT_VC_ENV_BAT_FILE
31042      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
31043          >> $EXTRACT_VC_ENV_BAT_FILE
31044
31045      # Now execute the newly created bat file.
31046      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
31047      # Change directory so we don't need to mess with Windows paths in redirects.
31048      cd $VS_ENV_TMP_DIR
31049      cmd /c extract-vs-env.bat | $CAT
31050      cd $CURDIR
31051
31052      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
31053        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
31054$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
31055        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31056$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31057        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31058$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31059        as_fn_error $? "Cannot continue" "$LINENO" 5
31060      fi
31061
31062      # Now set all paths and other env variables. This will allow the rest of
31063      # the configure script to find and run the compiler in the proper way.
31064      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
31065$as_echo "$as_me: Setting extracted environment variables" >&6;}
31066      . $VS_ENV_TMP_DIR/set-vs-env.sh
31067      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
31068      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
31069    else
31070      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
31071      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
31072$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
31073    fi
31074  fi
31075
31076  # At this point, we should have correct variables in the environment, or we can't continue.
31077  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
31078$as_echo_n "checking for Visual Studio variables... " >&6; }
31079
31080  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
31081      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
31082    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
31083      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
31084$as_echo "present but broken" >&6; }
31085      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
31086    else
31087      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31088$as_echo "ok" >&6; }
31089      # Remove any trailing "\" ";" and " " from the variables.
31090      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
31091      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
31092      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
31093      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
31094      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
31095      # Remove any paths containing # (typically F#) as that messes up make. This
31096      # is needed if visual studio was installed with F# support.
31097      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
31098
31099
31100
31101
31102
31103      # Convert VS_INCLUDE into SYSROOT_CFLAGS
31104      OLDIFS="$IFS"
31105      IFS=";"
31106      for i in $VS_INCLUDE; do
31107        ipath=$i
31108        # Only process non-empty elements
31109        if test "x$ipath" != x; then
31110          IFS="$OLDIFS"
31111          # Check that directory exists before calling fixup_path
31112          testpath=$ipath
31113
31114  windows_path="$testpath"
31115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31116    unix_path=`$CYGPATH -u "$windows_path"`
31117    testpath="$unix_path"
31118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31120    testpath="$unix_path"
31121  fi
31122
31123          if test -d "$testpath"; then
31124
31125  # Only process if variable expands to non-empty
31126
31127  if test "x$ipath" != x; then
31128    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31129
31130  # Input might be given as Windows format, start by converting to
31131  # unix format.
31132  path="$ipath"
31133  new_path=`$CYGPATH -u "$path"`
31134
31135  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31136  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31137  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31138  # "foo.exe" is OK but "foo" is an error.
31139  #
31140  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31141  # It is also a way to make sure we got the proper file name for the real test later on.
31142  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31143  if test "x$test_shortpath" = x; then
31144    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31145$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31146    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
31147  fi
31148
31149  # Call helper function which possibly converts this using DOS-style short mode.
31150  # If so, the updated path is stored in $new_path.
31151
31152  input_path="$new_path"
31153  # Check if we need to convert this using DOS-style short mode. If the path
31154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31155  # take no chances and rewrite it.
31156  # Note: m4 eats our [], so we need to use [ and ] instead.
31157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31158  if test "x$has_forbidden_chars" != x; then
31159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31160    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31161    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31162    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31163      # Going to short mode and back again did indeed matter. Since short mode is
31164      # case insensitive, let's make it lowercase to improve readability.
31165      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31166      # Now convert it back to Unix-style (cygpath)
31167      input_path=`$CYGPATH -u "$shortmode_path"`
31168      new_path="$input_path"
31169    fi
31170  fi
31171
31172  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31173  if test "x$test_cygdrive_prefix" = x; then
31174    # As a simple fix, exclude /usr/bin since it's not a real path.
31175    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31176      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31177      # a path prefixed by /cygdrive for fixpath to work.
31178      new_path="$CYGWIN_ROOT_PATH$input_path"
31179    fi
31180  fi
31181
31182
31183  if test "x$path" != "x$new_path"; then
31184    ipath="$new_path"
31185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31186$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31187  fi
31188
31189    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31190
31191  path="$ipath"
31192  has_colon=`$ECHO $path | $GREP ^.:`
31193  new_path="$path"
31194  if test "x$has_colon" = x; then
31195    # Not in mixed or Windows style, start by that.
31196    new_path=`cmd //c echo $path`
31197  fi
31198
31199
31200  input_path="$new_path"
31201  # Check if we need to convert this using DOS-style short mode. If the path
31202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31203  # take no chances and rewrite it.
31204  # Note: m4 eats our [], so we need to use [ and ] instead.
31205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31206  if test "x$has_forbidden_chars" != x; then
31207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31209  fi
31210
31211
31212  windows_path="$new_path"
31213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31214    unix_path=`$CYGPATH -u "$windows_path"`
31215    new_path="$unix_path"
31216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31218    new_path="$unix_path"
31219  fi
31220
31221  if test "x$path" != "x$new_path"; then
31222    ipath="$new_path"
31223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31224$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31225  fi
31226
31227  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31228  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31229
31230    else
31231      # We're on a unix platform. Hooray! :)
31232      path="$ipath"
31233      has_space=`$ECHO "$path" | $GREP " "`
31234      if test "x$has_space" != x; then
31235        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31236$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31237        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31238      fi
31239
31240      # Use eval to expand a potential ~
31241      eval path="$path"
31242      if test ! -f "$path" && test ! -d "$path"; then
31243        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
31244      fi
31245
31246      if test -d "$path"; then
31247        ipath="`cd "$path"; $THEPWDCMD -L`"
31248      else
31249        dir="`$DIRNAME "$path"`"
31250        base="`$BASENAME "$path"`"
31251        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
31252      fi
31253    fi
31254  fi
31255
31256            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
31257          fi
31258          IFS=";"
31259        fi
31260      done
31261      # Convert VS_LIB into SYSROOT_LDFLAGS
31262      for i in $VS_LIB; do
31263        libpath=$i
31264        # Only process non-empty elements
31265        if test "x$libpath" != x; then
31266          IFS="$OLDIFS"
31267          # Check that directory exists before calling fixup_path
31268          testpath=$libpath
31269
31270  windows_path="$testpath"
31271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31272    unix_path=`$CYGPATH -u "$windows_path"`
31273    testpath="$unix_path"
31274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31276    testpath="$unix_path"
31277  fi
31278
31279          if test -d "$testpath"; then
31280
31281  # Only process if variable expands to non-empty
31282
31283  if test "x$libpath" != x; then
31284    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31285
31286  # Input might be given as Windows format, start by converting to
31287  # unix format.
31288  path="$libpath"
31289  new_path=`$CYGPATH -u "$path"`
31290
31291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31294  # "foo.exe" is OK but "foo" is an error.
31295  #
31296  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31297  # It is also a way to make sure we got the proper file name for the real test later on.
31298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31299  if test "x$test_shortpath" = x; then
31300    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31301$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31302    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
31303  fi
31304
31305  # Call helper function which possibly converts this using DOS-style short mode.
31306  # If so, the updated path is stored in $new_path.
31307
31308  input_path="$new_path"
31309  # Check if we need to convert this using DOS-style short mode. If the path
31310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31311  # take no chances and rewrite it.
31312  # Note: m4 eats our [], so we need to use [ and ] instead.
31313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31314  if test "x$has_forbidden_chars" != x; then
31315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31319      # Going to short mode and back again did indeed matter. Since short mode is
31320      # case insensitive, let's make it lowercase to improve readability.
31321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31322      # Now convert it back to Unix-style (cygpath)
31323      input_path=`$CYGPATH -u "$shortmode_path"`
31324      new_path="$input_path"
31325    fi
31326  fi
31327
31328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31329  if test "x$test_cygdrive_prefix" = x; then
31330    # As a simple fix, exclude /usr/bin since it's not a real path.
31331    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31333      # a path prefixed by /cygdrive for fixpath to work.
31334      new_path="$CYGWIN_ROOT_PATH$input_path"
31335    fi
31336  fi
31337
31338
31339  if test "x$path" != "x$new_path"; then
31340    libpath="$new_path"
31341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31342$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31343  fi
31344
31345    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31346
31347  path="$libpath"
31348  has_colon=`$ECHO $path | $GREP ^.:`
31349  new_path="$path"
31350  if test "x$has_colon" = x; then
31351    # Not in mixed or Windows style, start by that.
31352    new_path=`cmd //c echo $path`
31353  fi
31354
31355
31356  input_path="$new_path"
31357  # Check if we need to convert this using DOS-style short mode. If the path
31358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31359  # take no chances and rewrite it.
31360  # Note: m4 eats our [], so we need to use [ and ] instead.
31361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31362  if test "x$has_forbidden_chars" != x; then
31363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31365  fi
31366
31367
31368  windows_path="$new_path"
31369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31370    unix_path=`$CYGPATH -u "$windows_path"`
31371    new_path="$unix_path"
31372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31374    new_path="$unix_path"
31375  fi
31376
31377  if test "x$path" != "x$new_path"; then
31378    libpath="$new_path"
31379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31380$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31381  fi
31382
31383  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31384  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31385
31386    else
31387      # We're on a unix platform. Hooray! :)
31388      path="$libpath"
31389      has_space=`$ECHO "$path" | $GREP " "`
31390      if test "x$has_space" != x; then
31391        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31392$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31393        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31394      fi
31395
31396      # Use eval to expand a potential ~
31397      eval path="$path"
31398      if test ! -f "$path" && test ! -d "$path"; then
31399        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
31400      fi
31401
31402      if test -d "$path"; then
31403        libpath="`cd "$path"; $THEPWDCMD -L`"
31404      else
31405        dir="`$DIRNAME "$path"`"
31406        base="`$BASENAME "$path"`"
31407        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
31408      fi
31409    fi
31410  fi
31411
31412            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
31413          fi
31414          IFS=";"
31415        fi
31416      done
31417      IFS="$OLDIFS"
31418    fi
31419  else
31420    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31421$as_echo "not found" >&6; }
31422
31423    if test "x$VS_ENV_CMD" = x; then
31424      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
31425$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
31426      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
31427$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
31428    else
31429      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
31430$as_echo "$as_me: Running the extraction script failed." >&6;}
31431    fi
31432    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31433$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31434    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31435$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31436    as_fn_error $? "Cannot continue" "$LINENO" 5
31437  fi
31438
31439    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
31440    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
31441    PATH="$VS_PATH"
31442    # The microsoft toolchain also requires INCLUDE and LIB to be set.
31443    export INCLUDE="$VS_INCLUDE"
31444    export LIB="$VS_LIB"
31445  else
31446    # Currently we do not define this for other toolchains. This might change as the need arise.
31447    TOOLCHAIN_VERSION=
31448  fi
31449
31450
31451  # For solaris we really need solaris tools, and not the GNU equivalent.
31452  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
31453  # so add that to path before starting to probe.
31454  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
31455  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
31456    PATH="/usr/ccs/bin:$PATH"
31457  fi
31458
31459  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
31460  # override all other locations.
31461  if test "x$TOOLCHAIN_PATH" != x; then
31462    PATH=$TOOLCHAIN_PATH:$PATH
31463  fi
31464
31465
31466  #
31467  # Setup the compilers (CC and CXX)
31468  #
31469
31470  COMPILER_NAME=C
31471  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
31472
31473  if test "x$CC" != x; then
31474    # User has supplied compiler name already, always let that override.
31475    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
31476$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
31477    if test "x`basename $CC`" = "x$CC"; then
31478      # A command without a complete path is provided, search $PATH.
31479
31480      for ac_prog in $CC
31481do
31482  # Extract the first word of "$ac_prog", so it can be a program name with args.
31483set dummy $ac_prog; ac_word=$2
31484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31485$as_echo_n "checking for $ac_word... " >&6; }
31486if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31487  $as_echo_n "(cached) " >&6
31488else
31489  case $POTENTIAL_CC in
31490  [\\/]* | ?:[\\/]*)
31491  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31492  ;;
31493  *)
31494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31495for as_dir in $PATH
31496do
31497  IFS=$as_save_IFS
31498  test -z "$as_dir" && as_dir=.
31499    for ac_exec_ext in '' $ac_executable_extensions; do
31500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31501    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31503    break 2
31504  fi
31505done
31506  done
31507IFS=$as_save_IFS
31508
31509  ;;
31510esac
31511fi
31512POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31513if test -n "$POTENTIAL_CC"; then
31514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31515$as_echo "$POTENTIAL_CC" >&6; }
31516else
31517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31518$as_echo "no" >&6; }
31519fi
31520
31521
31522  test -n "$POTENTIAL_CC" && break
31523done
31524
31525      if test "x$POTENTIAL_CC" != x; then
31526        CC=$POTENTIAL_CC
31527      else
31528        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
31529      fi
31530    else
31531      # Otherwise it might already be a complete path
31532      if test ! -x "$CC"; then
31533        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
31534      fi
31535    fi
31536  else
31537    # No user supplied value. Locate compiler ourselves.
31538
31539    # If we are cross compiling, assume cross compilation tools follows the
31540    # cross compilation standard where they are prefixed with the autoconf
31541    # standard name for the target. For example the binary
31542    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31543    # If we are not cross compiling, then the default compiler name will be
31544    # used.
31545
31546    CC=
31547    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31548    # before checking the rest of the PATH.
31549    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31550    # step, this should not be necessary.
31551    if test -n "$TOOLCHAIN_PATH"; then
31552      PATH_save="$PATH"
31553      PATH="$TOOLCHAIN_PATH"
31554      for ac_prog in $SEARCH_LIST
31555do
31556  # Extract the first word of "$ac_prog", so it can be a program name with args.
31557set dummy $ac_prog; ac_word=$2
31558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31559$as_echo_n "checking for $ac_word... " >&6; }
31560if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
31561  $as_echo_n "(cached) " >&6
31562else
31563  case $TOOLCHAIN_PATH_CC in
31564  [\\/]* | ?:[\\/]*)
31565  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
31566  ;;
31567  *)
31568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31569for as_dir in $PATH
31570do
31571  IFS=$as_save_IFS
31572  test -z "$as_dir" && as_dir=.
31573    for ac_exec_ext in '' $ac_executable_extensions; do
31574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31575    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
31576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31577    break 2
31578  fi
31579done
31580  done
31581IFS=$as_save_IFS
31582
31583  ;;
31584esac
31585fi
31586TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
31587if test -n "$TOOLCHAIN_PATH_CC"; then
31588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
31589$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
31590else
31591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31592$as_echo "no" >&6; }
31593fi
31594
31595
31596  test -n "$TOOLCHAIN_PATH_CC" && break
31597done
31598
31599      CC=$TOOLCHAIN_PATH_CC
31600      PATH="$PATH_save"
31601    fi
31602
31603    # AC_PATH_PROGS can't be run multiple times with the same variable,
31604    # so create a new name for this run.
31605    if test "x$CC" = x; then
31606      for ac_prog in $SEARCH_LIST
31607do
31608  # Extract the first word of "$ac_prog", so it can be a program name with args.
31609set dummy $ac_prog; ac_word=$2
31610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31611$as_echo_n "checking for $ac_word... " >&6; }
31612if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31613  $as_echo_n "(cached) " >&6
31614else
31615  case $POTENTIAL_CC in
31616  [\\/]* | ?:[\\/]*)
31617  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31618  ;;
31619  *)
31620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31621for as_dir in $PATH
31622do
31623  IFS=$as_save_IFS
31624  test -z "$as_dir" && as_dir=.
31625    for ac_exec_ext in '' $ac_executable_extensions; do
31626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31627    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31629    break 2
31630  fi
31631done
31632  done
31633IFS=$as_save_IFS
31634
31635  ;;
31636esac
31637fi
31638POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31639if test -n "$POTENTIAL_CC"; then
31640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31641$as_echo "$POTENTIAL_CC" >&6; }
31642else
31643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31644$as_echo "no" >&6; }
31645fi
31646
31647
31648  test -n "$POTENTIAL_CC" && break
31649done
31650
31651      CC=$POTENTIAL_CC
31652    fi
31653
31654    if test "x$CC" = x; then
31655
31656  # Print a helpful message on how to acquire the necessary build dependency.
31657  # devkit is the help tag: freetype, cups, alsa etc
31658  MISSING_DEPENDENCY=devkit
31659
31660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31661    cygwin_help $MISSING_DEPENDENCY
31662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31663    msys_help $MISSING_DEPENDENCY
31664  else
31665    PKGHANDLER_COMMAND=
31666
31667    case $PKGHANDLER in
31668      apt-get)
31669        apt_help     $MISSING_DEPENDENCY ;;
31670      yum)
31671        yum_help     $MISSING_DEPENDENCY ;;
31672      port)
31673        port_help    $MISSING_DEPENDENCY ;;
31674      pkgutil)
31675        pkgutil_help $MISSING_DEPENDENCY ;;
31676      pkgadd)
31677        pkgadd_help  $MISSING_DEPENDENCY ;;
31678    esac
31679
31680    if test "x$PKGHANDLER_COMMAND" != x; then
31681      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31682    fi
31683  fi
31684
31685      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31686    fi
31687  fi
31688
31689  # Now we have a compiler binary in CC. Make sure it's okay.
31690
31691  # Only process if variable expands to non-empty
31692
31693  if test "x$CC" != x; then
31694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31695
31696  # First separate the path from the arguments. This will split at the first
31697  # space.
31698  complete="$CC"
31699  path="${complete%% *}"
31700  tmp="$complete EOL"
31701  arguments="${tmp#* }"
31702
31703  # Input might be given as Windows format, start by converting to
31704  # unix format.
31705  new_path=`$CYGPATH -u "$path"`
31706
31707  # Now try to locate executable using which
31708  new_path=`$WHICH "$new_path" 2> /dev/null`
31709  # bat and cmd files are not always considered executable in cygwin causing which
31710  # to not find them
31711  if test "x$new_path" = x \
31712      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31713      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31714    new_path=`$CYGPATH -u "$path"`
31715  fi
31716  if test "x$new_path" = x; then
31717    # Oops. Which didn't find the executable.
31718    # The splitting of arguments from the executable at a space might have been incorrect,
31719    # since paths with space are more likely in Windows. Give it another try with the whole
31720    # argument.
31721    path="$complete"
31722    arguments="EOL"
31723    new_path=`$CYGPATH -u "$path"`
31724    new_path=`$WHICH "$new_path" 2> /dev/null`
31725    # bat and cmd files are not always considered executable in cygwin causing which
31726    # to not find them
31727    if test "x$new_path" = x \
31728        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31729        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31730      new_path=`$CYGPATH -u "$path"`
31731    fi
31732    if test "x$new_path" = x; then
31733      # It's still not found. Now this is an unrecoverable error.
31734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31735$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31736      has_space=`$ECHO "$complete" | $GREP " "`
31737      if test "x$has_space" != x; then
31738        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31739$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31740      fi
31741      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31742    fi
31743  fi
31744
31745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31748  # "foo.exe" is OK but "foo" is an error.
31749  #
31750  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31751  # It is also a way to make sure we got the proper file name for the real test later on.
31752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31753  if test "x$test_shortpath" = x; then
31754    # Short path failed, file does not exist as specified.
31755    # Try adding .exe or .cmd
31756    if test -f "${new_path}.exe"; then
31757      input_to_shortpath="${new_path}.exe"
31758    elif test -f "${new_path}.cmd"; then
31759      input_to_shortpath="${new_path}.cmd"
31760    else
31761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31762$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31763      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31764$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31765      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31766    fi
31767  else
31768    input_to_shortpath="$new_path"
31769  fi
31770
31771  # Call helper function which possibly converts this using DOS-style short mode.
31772  # If so, the updated path is stored in $new_path.
31773  new_path="$input_to_shortpath"
31774
31775  input_path="$input_to_shortpath"
31776  # Check if we need to convert this using DOS-style short mode. If the path
31777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31778  # take no chances and rewrite it.
31779  # Note: m4 eats our [], so we need to use [ and ] instead.
31780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31781  if test "x$has_forbidden_chars" != x; then
31782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31786      # Going to short mode and back again did indeed matter. Since short mode is
31787      # case insensitive, let's make it lowercase to improve readability.
31788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31789      # Now convert it back to Unix-style (cygpath)
31790      input_path=`$CYGPATH -u "$shortmode_path"`
31791      new_path="$input_path"
31792    fi
31793  fi
31794
31795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31796  if test "x$test_cygdrive_prefix" = x; then
31797    # As a simple fix, exclude /usr/bin since it's not a real path.
31798    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31800      # a path prefixed by /cygdrive for fixpath to work.
31801      new_path="$CYGWIN_ROOT_PATH$input_path"
31802    fi
31803  fi
31804
31805  # remove trailing .exe if any
31806  new_path="${new_path/%.exe/}"
31807
31808    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31809
31810  # First separate the path from the arguments. This will split at the first
31811  # space.
31812  complete="$CC"
31813  path="${complete%% *}"
31814  tmp="$complete EOL"
31815  arguments="${tmp#* }"
31816
31817  # Input might be given as Windows format, start by converting to
31818  # unix format.
31819  new_path="$path"
31820
31821  windows_path="$new_path"
31822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31823    unix_path=`$CYGPATH -u "$windows_path"`
31824    new_path="$unix_path"
31825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31827    new_path="$unix_path"
31828  fi
31829
31830
31831  # Now try to locate executable using which
31832  new_path=`$WHICH "$new_path" 2> /dev/null`
31833
31834  if test "x$new_path" = x; then
31835    # Oops. Which didn't find the executable.
31836    # The splitting of arguments from the executable at a space might have been incorrect,
31837    # since paths with space are more likely in Windows. Give it another try with the whole
31838    # argument.
31839    path="$complete"
31840    arguments="EOL"
31841    new_path="$path"
31842
31843  windows_path="$new_path"
31844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31845    unix_path=`$CYGPATH -u "$windows_path"`
31846    new_path="$unix_path"
31847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31849    new_path="$unix_path"
31850  fi
31851
31852
31853    new_path=`$WHICH "$new_path" 2> /dev/null`
31854    # bat and cmd files are not always considered executable in MSYS causing which
31855    # to not find them
31856    if test "x$new_path" = x \
31857        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31858        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31859      new_path="$path"
31860
31861  windows_path="$new_path"
31862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31863    unix_path=`$CYGPATH -u "$windows_path"`
31864    new_path="$unix_path"
31865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31867    new_path="$unix_path"
31868  fi
31869
31870    fi
31871
31872    if test "x$new_path" = x; then
31873      # It's still not found. Now this is an unrecoverable error.
31874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31875$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31876      has_space=`$ECHO "$complete" | $GREP " "`
31877      if test "x$has_space" != x; then
31878        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31879$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31880      fi
31881      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31882    fi
31883  fi
31884
31885  # Now new_path has a complete unix path to the binary
31886  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31887    # Keep paths in /bin as-is, but remove trailing .exe if any
31888    new_path="${new_path/%.exe/}"
31889    # Do not save /bin paths to all_fixpath_prefixes!
31890  else
31891    # Not in mixed or Windows style, start by that.
31892    new_path=`cmd //c echo $new_path`
31893
31894  input_path="$new_path"
31895  # Check if we need to convert this using DOS-style short mode. If the path
31896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31897  # take no chances and rewrite it.
31898  # Note: m4 eats our [], so we need to use [ and ] instead.
31899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31900  if test "x$has_forbidden_chars" != x; then
31901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31903  fi
31904
31905    # Output is in $new_path
31906
31907  windows_path="$new_path"
31908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31909    unix_path=`$CYGPATH -u "$windows_path"`
31910    new_path="$unix_path"
31911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31913    new_path="$unix_path"
31914  fi
31915
31916    # remove trailing .exe if any
31917    new_path="${new_path/%.exe/}"
31918
31919    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31920    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31921  fi
31922
31923    else
31924      # We're on a unix platform. Hooray! :)
31925      # First separate the path from the arguments. This will split at the first
31926      # space.
31927      complete="$CC"
31928      path="${complete%% *}"
31929      tmp="$complete EOL"
31930      arguments="${tmp#* }"
31931
31932      # Cannot rely on the command "which" here since it doesn't always work.
31933      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31934      if test -z "$is_absolute_path"; then
31935        # Path to executable is not absolute. Find it.
31936        IFS_save="$IFS"
31937        IFS=:
31938        for p in $PATH; do
31939          if test -f "$p/$path" && test -x "$p/$path"; then
31940            new_path="$p/$path"
31941            break
31942          fi
31943        done
31944        IFS="$IFS_save"
31945      else
31946        # This is an absolute path, we can use it without further modifications.
31947        new_path="$path"
31948      fi
31949
31950      if test "x$new_path" = x; then
31951        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31952$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31953        has_space=`$ECHO "$complete" | $GREP " "`
31954        if test "x$has_space" != x; then
31955          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31956$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31957        fi
31958        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31959      fi
31960    fi
31961
31962    # Now join together the path and the arguments once again
31963    if test "x$arguments" != xEOL; then
31964      new_complete="$new_path ${arguments% *}"
31965    else
31966      new_complete="$new_path"
31967    fi
31968
31969    if test "x$complete" != "x$new_complete"; then
31970      CC="$new_complete"
31971      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
31972$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
31973    fi
31974  fi
31975
31976  TEST_COMPILER="$CC"
31977  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31978  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31979  if test "x$OPENJDK_BUILD_OS" != xaix; then
31980    # FIXME: This test should not be needed anymore; we don't do that for any platform.
31981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
31982$as_echo_n "checking resolved symbolic links for CC... " >&6; }
31983
31984  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31985    # Follow a chain of symbolic links. Use readlink
31986    # where it exists, else fall back to horribly
31987    # complicated shell code.
31988    if test "x$READLINK_TESTED" != yes; then
31989      # On MacOSX there is a readlink tool with a different
31990      # purpose than the GNU readlink tool. Check the found readlink.
31991      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31992      if test "x$ISGNU" = x; then
31993        # A readlink that we do not know how to use.
31994        # Are there other non-GNU readlinks out there?
31995        READLINK_TESTED=yes
31996        READLINK=
31997      fi
31998    fi
31999
32000    if test "x$READLINK" != x; then
32001      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
32002    else
32003      # Save the current directory for restoring afterwards
32004      STARTDIR=$PWD
32005      COUNTER=0
32006      sym_link_dir=`$DIRNAME $TEST_COMPILER`
32007      sym_link_file=`$BASENAME $TEST_COMPILER`
32008      cd $sym_link_dir
32009      # Use -P flag to resolve symlinks in directories.
32010      cd `$THEPWDCMD -P`
32011      sym_link_dir=`$THEPWDCMD -P`
32012      # Resolve file symlinks
32013      while test $COUNTER -lt 20; do
32014        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32015        if test "x$ISLINK" == x; then
32016          # This is not a symbolic link! We are done!
32017          break
32018        fi
32019        # Again resolve directory symlinks since the target of the just found
32020        # link could be in a different directory
32021        cd `$DIRNAME $ISLINK`
32022        sym_link_dir=`$THEPWDCMD -P`
32023        sym_link_file=`$BASENAME $ISLINK`
32024        let COUNTER=COUNTER+1
32025      done
32026      cd $STARTDIR
32027      TEST_COMPILER=$sym_link_dir/$sym_link_file
32028    fi
32029  fi
32030
32031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
32032$as_echo "$TEST_COMPILER" >&6; }
32033  fi
32034  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
32035$as_echo_n "checking if CC is disguised ccache... " >&6; }
32036
32037  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
32038  if test "x$COMPILER_BASENAME" = "xccache"; then
32039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
32040$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
32041    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
32042    # We want to control ccache invocation ourselves, so ignore this cc and try
32043    # searching again.
32044
32045    # Remove the path to the fake ccache cc from the PATH
32046    RETRY_COMPILER_SAVED_PATH="$PATH"
32047    COMPILER_DIRNAME=`$DIRNAME $CC`
32048    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
32049
32050    # Try again looking for our compiler
32051    if test -n "$ac_tool_prefix"; then
32052  for ac_prog in $TOOLCHAIN_CC_BINARY
32053  do
32054    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32055set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32057$as_echo_n "checking for $ac_word... " >&6; }
32058if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
32059  $as_echo_n "(cached) " >&6
32060else
32061  if test -n "$PROPER_COMPILER_CC"; then
32062  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
32063else
32064as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32065for as_dir in $PATH
32066do
32067  IFS=$as_save_IFS
32068  test -z "$as_dir" && as_dir=.
32069    for ac_exec_ext in '' $ac_executable_extensions; do
32070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32071    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
32072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32073    break 2
32074  fi
32075done
32076  done
32077IFS=$as_save_IFS
32078
32079fi
32080fi
32081PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
32082if test -n "$PROPER_COMPILER_CC"; then
32083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
32084$as_echo "$PROPER_COMPILER_CC" >&6; }
32085else
32086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32087$as_echo "no" >&6; }
32088fi
32089
32090
32091    test -n "$PROPER_COMPILER_CC" && break
32092  done
32093fi
32094if test -z "$PROPER_COMPILER_CC"; then
32095  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
32096  for ac_prog in $TOOLCHAIN_CC_BINARY
32097do
32098  # Extract the first word of "$ac_prog", so it can be a program name with args.
32099set dummy $ac_prog; ac_word=$2
32100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32101$as_echo_n "checking for $ac_word... " >&6; }
32102if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
32103  $as_echo_n "(cached) " >&6
32104else
32105  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
32106  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
32107else
32108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32109for as_dir in $PATH
32110do
32111  IFS=$as_save_IFS
32112  test -z "$as_dir" && as_dir=.
32113    for ac_exec_ext in '' $ac_executable_extensions; do
32114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32115    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
32116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32117    break 2
32118  fi
32119done
32120  done
32121IFS=$as_save_IFS
32122
32123fi
32124fi
32125ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
32126if test -n "$ac_ct_PROPER_COMPILER_CC"; then
32127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
32128$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
32129else
32130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32131$as_echo "no" >&6; }
32132fi
32133
32134
32135  test -n "$ac_ct_PROPER_COMPILER_CC" && break
32136done
32137
32138  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
32139    PROPER_COMPILER_CC=""
32140  else
32141    case $cross_compiling:$ac_tool_warned in
32142yes:)
32143{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32144$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32145ac_tool_warned=yes ;;
32146esac
32147    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
32148  fi
32149fi
32150
32151
32152  # Only process if variable expands to non-empty
32153
32154  if test "x$PROPER_COMPILER_CC" != x; then
32155    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32156
32157  # First separate the path from the arguments. This will split at the first
32158  # space.
32159  complete="$PROPER_COMPILER_CC"
32160  path="${complete%% *}"
32161  tmp="$complete EOL"
32162  arguments="${tmp#* }"
32163
32164  # Input might be given as Windows format, start by converting to
32165  # unix format.
32166  new_path=`$CYGPATH -u "$path"`
32167
32168  # Now try to locate executable using which
32169  new_path=`$WHICH "$new_path" 2> /dev/null`
32170  # bat and cmd files are not always considered executable in cygwin causing which
32171  # to not find them
32172  if test "x$new_path" = x \
32173      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32174      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32175    new_path=`$CYGPATH -u "$path"`
32176  fi
32177  if test "x$new_path" = x; then
32178    # Oops. Which didn't find the executable.
32179    # The splitting of arguments from the executable at a space might have been incorrect,
32180    # since paths with space are more likely in Windows. Give it another try with the whole
32181    # argument.
32182    path="$complete"
32183    arguments="EOL"
32184    new_path=`$CYGPATH -u "$path"`
32185    new_path=`$WHICH "$new_path" 2> /dev/null`
32186    # bat and cmd files are not always considered executable in cygwin causing which
32187    # to not find them
32188    if test "x$new_path" = x \
32189        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32190        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32191      new_path=`$CYGPATH -u "$path"`
32192    fi
32193    if test "x$new_path" = x; then
32194      # It's still not found. Now this is an unrecoverable error.
32195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32196$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32197      has_space=`$ECHO "$complete" | $GREP " "`
32198      if test "x$has_space" != x; then
32199        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32200$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32201      fi
32202      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32203    fi
32204  fi
32205
32206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32209  # "foo.exe" is OK but "foo" is an error.
32210  #
32211  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32212  # It is also a way to make sure we got the proper file name for the real test later on.
32213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32214  if test "x$test_shortpath" = x; then
32215    # Short path failed, file does not exist as specified.
32216    # Try adding .exe or .cmd
32217    if test -f "${new_path}.exe"; then
32218      input_to_shortpath="${new_path}.exe"
32219    elif test -f "${new_path}.cmd"; then
32220      input_to_shortpath="${new_path}.cmd"
32221    else
32222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
32223$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
32224      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32225$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32226      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32227    fi
32228  else
32229    input_to_shortpath="$new_path"
32230  fi
32231
32232  # Call helper function which possibly converts this using DOS-style short mode.
32233  # If so, the updated path is stored in $new_path.
32234  new_path="$input_to_shortpath"
32235
32236  input_path="$input_to_shortpath"
32237  # Check if we need to convert this using DOS-style short mode. If the path
32238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32239  # take no chances and rewrite it.
32240  # Note: m4 eats our [], so we need to use [ and ] instead.
32241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32242  if test "x$has_forbidden_chars" != x; then
32243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32247      # Going to short mode and back again did indeed matter. Since short mode is
32248      # case insensitive, let's make it lowercase to improve readability.
32249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32250      # Now convert it back to Unix-style (cygpath)
32251      input_path=`$CYGPATH -u "$shortmode_path"`
32252      new_path="$input_path"
32253    fi
32254  fi
32255
32256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32257  if test "x$test_cygdrive_prefix" = x; then
32258    # As a simple fix, exclude /usr/bin since it's not a real path.
32259    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32261      # a path prefixed by /cygdrive for fixpath to work.
32262      new_path="$CYGWIN_ROOT_PATH$input_path"
32263    fi
32264  fi
32265
32266  # remove trailing .exe if any
32267  new_path="${new_path/%.exe/}"
32268
32269    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32270
32271  # First separate the path from the arguments. This will split at the first
32272  # space.
32273  complete="$PROPER_COMPILER_CC"
32274  path="${complete%% *}"
32275  tmp="$complete EOL"
32276  arguments="${tmp#* }"
32277
32278  # Input might be given as Windows format, start by converting to
32279  # unix format.
32280  new_path="$path"
32281
32282  windows_path="$new_path"
32283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32284    unix_path=`$CYGPATH -u "$windows_path"`
32285    new_path="$unix_path"
32286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32288    new_path="$unix_path"
32289  fi
32290
32291
32292  # Now try to locate executable using which
32293  new_path=`$WHICH "$new_path" 2> /dev/null`
32294
32295  if test "x$new_path" = x; then
32296    # Oops. Which didn't find the executable.
32297    # The splitting of arguments from the executable at a space might have been incorrect,
32298    # since paths with space are more likely in Windows. Give it another try with the whole
32299    # argument.
32300    path="$complete"
32301    arguments="EOL"
32302    new_path="$path"
32303
32304  windows_path="$new_path"
32305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32306    unix_path=`$CYGPATH -u "$windows_path"`
32307    new_path="$unix_path"
32308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32310    new_path="$unix_path"
32311  fi
32312
32313
32314    new_path=`$WHICH "$new_path" 2> /dev/null`
32315    # bat and cmd files are not always considered executable in MSYS causing which
32316    # to not find them
32317    if test "x$new_path" = x \
32318        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32319        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32320      new_path="$path"
32321
32322  windows_path="$new_path"
32323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32324    unix_path=`$CYGPATH -u "$windows_path"`
32325    new_path="$unix_path"
32326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32328    new_path="$unix_path"
32329  fi
32330
32331    fi
32332
32333    if test "x$new_path" = x; then
32334      # It's still not found. Now this is an unrecoverable error.
32335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32336$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32337      has_space=`$ECHO "$complete" | $GREP " "`
32338      if test "x$has_space" != x; then
32339        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32340$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32341      fi
32342      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32343    fi
32344  fi
32345
32346  # Now new_path has a complete unix path to the binary
32347  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32348    # Keep paths in /bin as-is, but remove trailing .exe if any
32349    new_path="${new_path/%.exe/}"
32350    # Do not save /bin paths to all_fixpath_prefixes!
32351  else
32352    # Not in mixed or Windows style, start by that.
32353    new_path=`cmd //c echo $new_path`
32354
32355  input_path="$new_path"
32356  # Check if we need to convert this using DOS-style short mode. If the path
32357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32358  # take no chances and rewrite it.
32359  # Note: m4 eats our [], so we need to use [ and ] instead.
32360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32361  if test "x$has_forbidden_chars" != x; then
32362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32363    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32364  fi
32365
32366    # Output is in $new_path
32367
32368  windows_path="$new_path"
32369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32370    unix_path=`$CYGPATH -u "$windows_path"`
32371    new_path="$unix_path"
32372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32374    new_path="$unix_path"
32375  fi
32376
32377    # remove trailing .exe if any
32378    new_path="${new_path/%.exe/}"
32379
32380    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32381    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32382  fi
32383
32384    else
32385      # We're on a unix platform. Hooray! :)
32386      # First separate the path from the arguments. This will split at the first
32387      # space.
32388      complete="$PROPER_COMPILER_CC"
32389      path="${complete%% *}"
32390      tmp="$complete EOL"
32391      arguments="${tmp#* }"
32392
32393      # Cannot rely on the command "which" here since it doesn't always work.
32394      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32395      if test -z "$is_absolute_path"; then
32396        # Path to executable is not absolute. Find it.
32397        IFS_save="$IFS"
32398        IFS=:
32399        for p in $PATH; do
32400          if test -f "$p/$path" && test -x "$p/$path"; then
32401            new_path="$p/$path"
32402            break
32403          fi
32404        done
32405        IFS="$IFS_save"
32406      else
32407        # This is an absolute path, we can use it without further modifications.
32408        new_path="$path"
32409      fi
32410
32411      if test "x$new_path" = x; then
32412        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32413$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32414        has_space=`$ECHO "$complete" | $GREP " "`
32415        if test "x$has_space" != x; then
32416          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32417$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32418        fi
32419        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32420      fi
32421    fi
32422
32423    # Now join together the path and the arguments once again
32424    if test "x$arguments" != xEOL; then
32425      new_complete="$new_path ${arguments% *}"
32426    else
32427      new_complete="$new_path"
32428    fi
32429
32430    if test "x$complete" != "x$new_complete"; then
32431      PROPER_COMPILER_CC="$new_complete"
32432      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
32433$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
32434    fi
32435  fi
32436
32437    PATH="$RETRY_COMPILER_SAVED_PATH"
32438
32439    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
32440$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
32441
32442  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32443    # Follow a chain of symbolic links. Use readlink
32444    # where it exists, else fall back to horribly
32445    # complicated shell code.
32446    if test "x$READLINK_TESTED" != yes; then
32447      # On MacOSX there is a readlink tool with a different
32448      # purpose than the GNU readlink tool. Check the found readlink.
32449      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32450      if test "x$ISGNU" = x; then
32451        # A readlink that we do not know how to use.
32452        # Are there other non-GNU readlinks out there?
32453        READLINK_TESTED=yes
32454        READLINK=
32455      fi
32456    fi
32457
32458    if test "x$READLINK" != x; then
32459      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
32460    else
32461      # Save the current directory for restoring afterwards
32462      STARTDIR=$PWD
32463      COUNTER=0
32464      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
32465      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
32466      cd $sym_link_dir
32467      # Use -P flag to resolve symlinks in directories.
32468      cd `$THEPWDCMD -P`
32469      sym_link_dir=`$THEPWDCMD -P`
32470      # Resolve file symlinks
32471      while test $COUNTER -lt 20; do
32472        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32473        if test "x$ISLINK" == x; then
32474          # This is not a symbolic link! We are done!
32475          break
32476        fi
32477        # Again resolve directory symlinks since the target of the just found
32478        # link could be in a different directory
32479        cd `$DIRNAME $ISLINK`
32480        sym_link_dir=`$THEPWDCMD -P`
32481        sym_link_file=`$BASENAME $ISLINK`
32482        let COUNTER=COUNTER+1
32483      done
32484      cd $STARTDIR
32485      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
32486    fi
32487  fi
32488
32489    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
32490$as_echo "$PROPER_COMPILER_CC" >&6; }
32491    CC="$PROPER_COMPILER_CC"
32492  else
32493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
32494$as_echo "no, keeping CC" >&6; }
32495  fi
32496
32497
32498  COMPILER=$CC
32499  COMPILER_NAME=$COMPILER_NAME
32500
32501  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32502    # cc -V output typically looks like
32503    #     cc: Sun C 5.12 Linux_i386 2011/11/16
32504    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32505    # Check that this is likely to be the Solaris Studio cc.
32506    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32507    if test $? -ne 0; then
32508      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32509      { $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
32510$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32511      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32512$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32513      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32514$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32515      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32516    fi
32517    # Remove usage instructions (if present), and
32518    # collapse compiler output into a single line
32519    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32520        $SED -e 's/ *[Uu]sage:.*//'`
32521    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32522        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32523  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32524    # xlc -qversion output typically looks like
32525    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32526    #     Version: 11.01.0000.0015
32527    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32528    # Check that this is likely to be the IBM XL C compiler.
32529    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32530    if test $? -ne 0; then
32531      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32532      { $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
32533$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32534      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32535$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32536      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32537$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32538      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32539    fi
32540    # Collapse compiler output into a single line
32541    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32542    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32543        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32544  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32545    # There is no specific version flag, but all output starts with a version string.
32546    # First line typically looks something like:
32547    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32548    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32549    # Check that this is likely to be Microsoft CL.EXE.
32550    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32551    if test $? -ne 0; then
32552      { $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
32553$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32554      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32555$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32556      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32557    fi
32558    # Collapse compiler output into a single line
32559    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32560    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32561        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32562  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32563    # gcc --version output typically looks like
32564    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32565    #     Copyright (C) 2013 Free Software Foundation, Inc.
32566    #     This is free software; see the source for copying conditions.  There is NO
32567    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32568    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32569    # Check that this is likely to be GCC.
32570    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32571    if test $? -ne 0; then
32572      { $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
32573$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32574      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32575$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32576      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32577    fi
32578    # Remove Copyright and legalese from version string, and
32579    # collapse into a single line
32580    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32581        $SED -e 's/ *Copyright .*//'`
32582    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32583        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32584  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32585    # clang --version output typically looks like
32586    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32587    #    clang version 3.3 (tags/RELEASE_33/final)
32588    # or
32589    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32590    #    Target: x86_64-pc-linux-gnu
32591    #    Thread model: posix
32592    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32593    # Check that this is likely to be clang
32594    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32595    if test $? -ne 0; then
32596      { $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
32597$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32598      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32599$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32600      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32601    fi
32602    # Collapse compiler output into a single line
32603    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32604    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32605        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
32606  else
32607      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32608  fi
32609  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32610  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32611  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32612  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32613
32614  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32615$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32616
32617
32618  # Now that we have resolved CC ourself, let autoconf have its go at it
32619  ac_ext=c
32620ac_cpp='$CPP $CPPFLAGS'
32621ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32622ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32623ac_compiler_gnu=$ac_cv_c_compiler_gnu
32624if test -n "$ac_tool_prefix"; then
32625  for ac_prog in $CC
32626  do
32627    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32628set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32630$as_echo_n "checking for $ac_word... " >&6; }
32631if ${ac_cv_prog_CC+:} false; then :
32632  $as_echo_n "(cached) " >&6
32633else
32634  if test -n "$CC"; then
32635  ac_cv_prog_CC="$CC" # Let the user override the test.
32636else
32637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32638for as_dir in $PATH
32639do
32640  IFS=$as_save_IFS
32641  test -z "$as_dir" && as_dir=.
32642    for ac_exec_ext in '' $ac_executable_extensions; do
32643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32644    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32646    break 2
32647  fi
32648done
32649  done
32650IFS=$as_save_IFS
32651
32652fi
32653fi
32654CC=$ac_cv_prog_CC
32655if test -n "$CC"; then
32656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32657$as_echo "$CC" >&6; }
32658else
32659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32660$as_echo "no" >&6; }
32661fi
32662
32663
32664    test -n "$CC" && break
32665  done
32666fi
32667if test -z "$CC"; then
32668  ac_ct_CC=$CC
32669  for ac_prog in $CC
32670do
32671  # Extract the first word of "$ac_prog", so it can be a program name with args.
32672set dummy $ac_prog; ac_word=$2
32673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32674$as_echo_n "checking for $ac_word... " >&6; }
32675if ${ac_cv_prog_ac_ct_CC+:} false; then :
32676  $as_echo_n "(cached) " >&6
32677else
32678  if test -n "$ac_ct_CC"; then
32679  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32680else
32681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32682for as_dir in $PATH
32683do
32684  IFS=$as_save_IFS
32685  test -z "$as_dir" && as_dir=.
32686    for ac_exec_ext in '' $ac_executable_extensions; do
32687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32688    ac_cv_prog_ac_ct_CC="$ac_prog"
32689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32690    break 2
32691  fi
32692done
32693  done
32694IFS=$as_save_IFS
32695
32696fi
32697fi
32698ac_ct_CC=$ac_cv_prog_ac_ct_CC
32699if test -n "$ac_ct_CC"; then
32700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32701$as_echo "$ac_ct_CC" >&6; }
32702else
32703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32704$as_echo "no" >&6; }
32705fi
32706
32707
32708  test -n "$ac_ct_CC" && break
32709done
32710
32711  if test "x$ac_ct_CC" = x; then
32712    CC=""
32713  else
32714    case $cross_compiling:$ac_tool_warned in
32715yes:)
32716{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32717$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32718ac_tool_warned=yes ;;
32719esac
32720    CC=$ac_ct_CC
32721  fi
32722fi
32723
32724
32725test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32726$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32727as_fn_error $? "no acceptable C compiler found in \$PATH
32728See \`config.log' for more details" "$LINENO" 5; }
32729
32730# Provide some information about the compiler.
32731$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32732set X $ac_compile
32733ac_compiler=$2
32734for ac_option in --version -v -V -qversion; do
32735  { { ac_try="$ac_compiler $ac_option >&5"
32736case "(($ac_try" in
32737  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32738  *) ac_try_echo=$ac_try;;
32739esac
32740eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32741$as_echo "$ac_try_echo"; } >&5
32742  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32743  ac_status=$?
32744  if test -s conftest.err; then
32745    sed '10a\
32746... rest of stderr output deleted ...
32747         10q' conftest.err >conftest.er1
32748    cat conftest.er1 >&5
32749  fi
32750  rm -f conftest.er1 conftest.err
32751  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32752  test $ac_status = 0; }
32753done
32754
32755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32756/* end confdefs.h.  */
32757
32758int
32759main ()
32760{
32761
32762  ;
32763  return 0;
32764}
32765_ACEOF
32766ac_clean_files_save=$ac_clean_files
32767ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32768# Try to create an executable without -o first, disregard a.out.
32769# It will help us diagnose broken compilers, and finding out an intuition
32770# of exeext.
32771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32772$as_echo_n "checking whether the C compiler works... " >&6; }
32773ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32774
32775# The possible output files:
32776ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32777
32778ac_rmfiles=
32779for ac_file in $ac_files
32780do
32781  case $ac_file in
32782    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32783    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32784  esac
32785done
32786rm -f $ac_rmfiles
32787
32788if { { ac_try="$ac_link_default"
32789case "(($ac_try" in
32790  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32791  *) ac_try_echo=$ac_try;;
32792esac
32793eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32794$as_echo "$ac_try_echo"; } >&5
32795  (eval "$ac_link_default") 2>&5
32796  ac_status=$?
32797  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32798  test $ac_status = 0; }; then :
32799  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32800# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32801# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32802# so that the user can short-circuit this test for compilers unknown to
32803# Autoconf.
32804for ac_file in $ac_files ''
32805do
32806  test -f "$ac_file" || continue
32807  case $ac_file in
32808    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32809	;;
32810    [ab].out )
32811	# We found the default executable, but exeext='' is most
32812	# certainly right.
32813	break;;
32814    *.* )
32815	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32816	then :; else
32817	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32818	fi
32819	# We set ac_cv_exeext here because the later test for it is not
32820	# safe: cross compilers may not add the suffix if given an `-o'
32821	# argument, so we may need to know it at that point already.
32822	# Even if this section looks crufty: it has the advantage of
32823	# actually working.
32824	break;;
32825    * )
32826	break;;
32827  esac
32828done
32829test "$ac_cv_exeext" = no && ac_cv_exeext=
32830
32831else
32832  ac_file=''
32833fi
32834if test -z "$ac_file"; then :
32835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32836$as_echo "no" >&6; }
32837$as_echo "$as_me: failed program was:" >&5
32838sed 's/^/| /' conftest.$ac_ext >&5
32839
32840{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32841$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32842as_fn_error 77 "C compiler cannot create executables
32843See \`config.log' for more details" "$LINENO" 5; }
32844else
32845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32846$as_echo "yes" >&6; }
32847fi
32848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32849$as_echo_n "checking for C compiler default output file name... " >&6; }
32850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32851$as_echo "$ac_file" >&6; }
32852ac_exeext=$ac_cv_exeext
32853
32854rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32855ac_clean_files=$ac_clean_files_save
32856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32857$as_echo_n "checking for suffix of executables... " >&6; }
32858if { { ac_try="$ac_link"
32859case "(($ac_try" in
32860  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32861  *) ac_try_echo=$ac_try;;
32862esac
32863eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32864$as_echo "$ac_try_echo"; } >&5
32865  (eval "$ac_link") 2>&5
32866  ac_status=$?
32867  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32868  test $ac_status = 0; }; then :
32869  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32870# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32871# work properly (i.e., refer to `conftest.exe'), while it won't with
32872# `rm'.
32873for ac_file in conftest.exe conftest conftest.*; do
32874  test -f "$ac_file" || continue
32875  case $ac_file in
32876    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32877    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32878	  break;;
32879    * ) break;;
32880  esac
32881done
32882else
32883  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32884$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32885as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32886See \`config.log' for more details" "$LINENO" 5; }
32887fi
32888rm -f conftest conftest$ac_cv_exeext
32889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32890$as_echo "$ac_cv_exeext" >&6; }
32891
32892rm -f conftest.$ac_ext
32893EXEEXT=$ac_cv_exeext
32894ac_exeext=$EXEEXT
32895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32896/* end confdefs.h.  */
32897#include <stdio.h>
32898int
32899main ()
32900{
32901FILE *f = fopen ("conftest.out", "w");
32902 return ferror (f) || fclose (f) != 0;
32903
32904  ;
32905  return 0;
32906}
32907_ACEOF
32908ac_clean_files="$ac_clean_files conftest.out"
32909# Check that the compiler produces executables we can run.  If not, either
32910# the compiler is broken, or we cross compile.
32911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32912$as_echo_n "checking whether we are cross compiling... " >&6; }
32913if test "$cross_compiling" != yes; then
32914  { { ac_try="$ac_link"
32915case "(($ac_try" in
32916  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32917  *) ac_try_echo=$ac_try;;
32918esac
32919eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32920$as_echo "$ac_try_echo"; } >&5
32921  (eval "$ac_link") 2>&5
32922  ac_status=$?
32923  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32924  test $ac_status = 0; }
32925  if { ac_try='./conftest$ac_cv_exeext'
32926  { { case "(($ac_try" in
32927  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32928  *) ac_try_echo=$ac_try;;
32929esac
32930eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32931$as_echo "$ac_try_echo"; } >&5
32932  (eval "$ac_try") 2>&5
32933  ac_status=$?
32934  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32935  test $ac_status = 0; }; }; then
32936    cross_compiling=no
32937  else
32938    if test "$cross_compiling" = maybe; then
32939	cross_compiling=yes
32940    else
32941	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32942$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32943as_fn_error $? "cannot run C compiled programs.
32944If you meant to cross compile, use \`--host'.
32945See \`config.log' for more details" "$LINENO" 5; }
32946    fi
32947  fi
32948fi
32949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32950$as_echo "$cross_compiling" >&6; }
32951
32952rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32953ac_clean_files=$ac_clean_files_save
32954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32955$as_echo_n "checking for suffix of object files... " >&6; }
32956if ${ac_cv_objext+:} false; then :
32957  $as_echo_n "(cached) " >&6
32958else
32959  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32960/* end confdefs.h.  */
32961
32962int
32963main ()
32964{
32965
32966  ;
32967  return 0;
32968}
32969_ACEOF
32970rm -f conftest.o conftest.obj
32971if { { ac_try="$ac_compile"
32972case "(($ac_try" in
32973  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32974  *) ac_try_echo=$ac_try;;
32975esac
32976eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32977$as_echo "$ac_try_echo"; } >&5
32978  (eval "$ac_compile") 2>&5
32979  ac_status=$?
32980  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32981  test $ac_status = 0; }; then :
32982  for ac_file in conftest.o conftest.obj conftest.*; do
32983  test -f "$ac_file" || continue;
32984  case $ac_file in
32985    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32986    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32987       break;;
32988  esac
32989done
32990else
32991  $as_echo "$as_me: failed program was:" >&5
32992sed 's/^/| /' conftest.$ac_ext >&5
32993
32994{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32995$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32996as_fn_error $? "cannot compute suffix of object files: cannot compile
32997See \`config.log' for more details" "$LINENO" 5; }
32998fi
32999rm -f conftest.$ac_cv_objext conftest.$ac_ext
33000fi
33001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
33002$as_echo "$ac_cv_objext" >&6; }
33003OBJEXT=$ac_cv_objext
33004ac_objext=$OBJEXT
33005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33006$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
33007if ${ac_cv_c_compiler_gnu+:} false; then :
33008  $as_echo_n "(cached) " >&6
33009else
33010  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33011/* end confdefs.h.  */
33012
33013int
33014main ()
33015{
33016#ifndef __GNUC__
33017       choke me
33018#endif
33019
33020  ;
33021  return 0;
33022}
33023_ACEOF
33024if ac_fn_c_try_compile "$LINENO"; then :
33025  ac_compiler_gnu=yes
33026else
33027  ac_compiler_gnu=no
33028fi
33029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33030ac_cv_c_compiler_gnu=$ac_compiler_gnu
33031
33032fi
33033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33034$as_echo "$ac_cv_c_compiler_gnu" >&6; }
33035if test $ac_compiler_gnu = yes; then
33036  GCC=yes
33037else
33038  GCC=
33039fi
33040ac_test_CFLAGS=${CFLAGS+set}
33041ac_save_CFLAGS=$CFLAGS
33042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33043$as_echo_n "checking whether $CC accepts -g... " >&6; }
33044if ${ac_cv_prog_cc_g+:} false; then :
33045  $as_echo_n "(cached) " >&6
33046else
33047  ac_save_c_werror_flag=$ac_c_werror_flag
33048   ac_c_werror_flag=yes
33049   ac_cv_prog_cc_g=no
33050   CFLAGS="-g"
33051   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33052/* end confdefs.h.  */
33053
33054int
33055main ()
33056{
33057
33058  ;
33059  return 0;
33060}
33061_ACEOF
33062if ac_fn_c_try_compile "$LINENO"; then :
33063  ac_cv_prog_cc_g=yes
33064else
33065  CFLAGS=""
33066      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33067/* end confdefs.h.  */
33068
33069int
33070main ()
33071{
33072
33073  ;
33074  return 0;
33075}
33076_ACEOF
33077if ac_fn_c_try_compile "$LINENO"; then :
33078
33079else
33080  ac_c_werror_flag=$ac_save_c_werror_flag
33081	 CFLAGS="-g"
33082	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33083/* end confdefs.h.  */
33084
33085int
33086main ()
33087{
33088
33089  ;
33090  return 0;
33091}
33092_ACEOF
33093if ac_fn_c_try_compile "$LINENO"; then :
33094  ac_cv_prog_cc_g=yes
33095fi
33096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33097fi
33098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33099fi
33100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33101   ac_c_werror_flag=$ac_save_c_werror_flag
33102fi
33103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33104$as_echo "$ac_cv_prog_cc_g" >&6; }
33105if test "$ac_test_CFLAGS" = set; then
33106  CFLAGS=$ac_save_CFLAGS
33107elif test $ac_cv_prog_cc_g = yes; then
33108  if test "$GCC" = yes; then
33109    CFLAGS="-g -O2"
33110  else
33111    CFLAGS="-g"
33112  fi
33113else
33114  if test "$GCC" = yes; then
33115    CFLAGS="-O2"
33116  else
33117    CFLAGS=
33118  fi
33119fi
33120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33121$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33122if ${ac_cv_prog_cc_c89+:} false; then :
33123  $as_echo_n "(cached) " >&6
33124else
33125  ac_cv_prog_cc_c89=no
33126ac_save_CC=$CC
33127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33128/* end confdefs.h.  */
33129#include <stdarg.h>
33130#include <stdio.h>
33131struct stat;
33132/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33133struct buf { int x; };
33134FILE * (*rcsopen) (struct buf *, struct stat *, int);
33135static char *e (p, i)
33136     char **p;
33137     int i;
33138{
33139  return p[i];
33140}
33141static char *f (char * (*g) (char **, int), char **p, ...)
33142{
33143  char *s;
33144  va_list v;
33145  va_start (v,p);
33146  s = g (p, va_arg (v,int));
33147  va_end (v);
33148  return s;
33149}
33150
33151/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33152   function prototypes and stuff, but not '\xHH' hex character constants.
33153   These don't provoke an error unfortunately, instead are silently treated
33154   as 'x'.  The following induces an error, until -std is added to get
33155   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33156   array size at least.  It's necessary to write '\x00'==0 to get something
33157   that's true only with -std.  */
33158int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33159
33160/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33161   inside strings and character constants.  */
33162#define FOO(x) 'x'
33163int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33164
33165int test (int i, double x);
33166struct s1 {int (*f) (int a);};
33167struct s2 {int (*f) (double a);};
33168int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33169int argc;
33170char **argv;
33171int
33172main ()
33173{
33174return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33175  ;
33176  return 0;
33177}
33178_ACEOF
33179for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33180	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33181do
33182  CC="$ac_save_CC $ac_arg"
33183  if ac_fn_c_try_compile "$LINENO"; then :
33184  ac_cv_prog_cc_c89=$ac_arg
33185fi
33186rm -f core conftest.err conftest.$ac_objext
33187  test "x$ac_cv_prog_cc_c89" != "xno" && break
33188done
33189rm -f conftest.$ac_ext
33190CC=$ac_save_CC
33191
33192fi
33193# AC_CACHE_VAL
33194case "x$ac_cv_prog_cc_c89" in
33195  x)
33196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33197$as_echo "none needed" >&6; } ;;
33198  xno)
33199    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33200$as_echo "unsupported" >&6; } ;;
33201  *)
33202    CC="$CC $ac_cv_prog_cc_c89"
33203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33204$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33205esac
33206if test "x$ac_cv_prog_cc_c89" != xno; then :
33207
33208fi
33209
33210ac_ext=cpp
33211ac_cpp='$CXXCPP $CPPFLAGS'
33212ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33213ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33214ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33215
33216
33217
33218  COMPILER_NAME=C++
33219  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33220
33221  if test "x$CXX" != x; then
33222    # User has supplied compiler name already, always let that override.
33223    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33224$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33225    if test "x`basename $CXX`" = "x$CXX"; then
33226      # A command without a complete path is provided, search $PATH.
33227
33228      for ac_prog in $CXX
33229do
33230  # Extract the first word of "$ac_prog", so it can be a program name with args.
33231set dummy $ac_prog; ac_word=$2
33232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33233$as_echo_n "checking for $ac_word... " >&6; }
33234if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33235  $as_echo_n "(cached) " >&6
33236else
33237  case $POTENTIAL_CXX in
33238  [\\/]* | ?:[\\/]*)
33239  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33240  ;;
33241  *)
33242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33243for as_dir in $PATH
33244do
33245  IFS=$as_save_IFS
33246  test -z "$as_dir" && as_dir=.
33247    for ac_exec_ext in '' $ac_executable_extensions; do
33248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33249    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33251    break 2
33252  fi
33253done
33254  done
33255IFS=$as_save_IFS
33256
33257  ;;
33258esac
33259fi
33260POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33261if test -n "$POTENTIAL_CXX"; then
33262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33263$as_echo "$POTENTIAL_CXX" >&6; }
33264else
33265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33266$as_echo "no" >&6; }
33267fi
33268
33269
33270  test -n "$POTENTIAL_CXX" && break
33271done
33272
33273      if test "x$POTENTIAL_CXX" != x; then
33274        CXX=$POTENTIAL_CXX
33275      else
33276        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33277      fi
33278    else
33279      # Otherwise it might already be a complete path
33280      if test ! -x "$CXX"; then
33281        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33282      fi
33283    fi
33284  else
33285    # No user supplied value. Locate compiler ourselves.
33286
33287    # If we are cross compiling, assume cross compilation tools follows the
33288    # cross compilation standard where they are prefixed with the autoconf
33289    # standard name for the target. For example the binary
33290    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33291    # If we are not cross compiling, then the default compiler name will be
33292    # used.
33293
33294    CXX=
33295    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33296    # before checking the rest of the PATH.
33297    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33298    # step, this should not be necessary.
33299    if test -n "$TOOLCHAIN_PATH"; then
33300      PATH_save="$PATH"
33301      PATH="$TOOLCHAIN_PATH"
33302      for ac_prog in $SEARCH_LIST
33303do
33304  # Extract the first word of "$ac_prog", so it can be a program name with args.
33305set dummy $ac_prog; ac_word=$2
33306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33307$as_echo_n "checking for $ac_word... " >&6; }
33308if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33309  $as_echo_n "(cached) " >&6
33310else
33311  case $TOOLCHAIN_PATH_CXX in
33312  [\\/]* | ?:[\\/]*)
33313  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33314  ;;
33315  *)
33316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33317for as_dir in $PATH
33318do
33319  IFS=$as_save_IFS
33320  test -z "$as_dir" && as_dir=.
33321    for ac_exec_ext in '' $ac_executable_extensions; do
33322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33323    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33325    break 2
33326  fi
33327done
33328  done
33329IFS=$as_save_IFS
33330
33331  ;;
33332esac
33333fi
33334TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33335if test -n "$TOOLCHAIN_PATH_CXX"; then
33336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33337$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33338else
33339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33340$as_echo "no" >&6; }
33341fi
33342
33343
33344  test -n "$TOOLCHAIN_PATH_CXX" && break
33345done
33346
33347      CXX=$TOOLCHAIN_PATH_CXX
33348      PATH="$PATH_save"
33349    fi
33350
33351    # AC_PATH_PROGS can't be run multiple times with the same variable,
33352    # so create a new name for this run.
33353    if test "x$CXX" = x; then
33354      for ac_prog in $SEARCH_LIST
33355do
33356  # Extract the first word of "$ac_prog", so it can be a program name with args.
33357set dummy $ac_prog; ac_word=$2
33358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33359$as_echo_n "checking for $ac_word... " >&6; }
33360if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33361  $as_echo_n "(cached) " >&6
33362else
33363  case $POTENTIAL_CXX in
33364  [\\/]* | ?:[\\/]*)
33365  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33366  ;;
33367  *)
33368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33369for as_dir in $PATH
33370do
33371  IFS=$as_save_IFS
33372  test -z "$as_dir" && as_dir=.
33373    for ac_exec_ext in '' $ac_executable_extensions; do
33374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33375    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33377    break 2
33378  fi
33379done
33380  done
33381IFS=$as_save_IFS
33382
33383  ;;
33384esac
33385fi
33386POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33387if test -n "$POTENTIAL_CXX"; then
33388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33389$as_echo "$POTENTIAL_CXX" >&6; }
33390else
33391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33392$as_echo "no" >&6; }
33393fi
33394
33395
33396  test -n "$POTENTIAL_CXX" && break
33397done
33398
33399      CXX=$POTENTIAL_CXX
33400    fi
33401
33402    if test "x$CXX" = x; then
33403
33404  # Print a helpful message on how to acquire the necessary build dependency.
33405  # devkit is the help tag: freetype, cups, alsa etc
33406  MISSING_DEPENDENCY=devkit
33407
33408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33409    cygwin_help $MISSING_DEPENDENCY
33410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33411    msys_help $MISSING_DEPENDENCY
33412  else
33413    PKGHANDLER_COMMAND=
33414
33415    case $PKGHANDLER in
33416      apt-get)
33417        apt_help     $MISSING_DEPENDENCY ;;
33418      yum)
33419        yum_help     $MISSING_DEPENDENCY ;;
33420      port)
33421        port_help    $MISSING_DEPENDENCY ;;
33422      pkgutil)
33423        pkgutil_help $MISSING_DEPENDENCY ;;
33424      pkgadd)
33425        pkgadd_help  $MISSING_DEPENDENCY ;;
33426    esac
33427
33428    if test "x$PKGHANDLER_COMMAND" != x; then
33429      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33430    fi
33431  fi
33432
33433      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33434    fi
33435  fi
33436
33437  # Now we have a compiler binary in CXX. Make sure it's okay.
33438
33439  # Only process if variable expands to non-empty
33440
33441  if test "x$CXX" != x; then
33442    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33443
33444  # First separate the path from the arguments. This will split at the first
33445  # space.
33446  complete="$CXX"
33447  path="${complete%% *}"
33448  tmp="$complete EOL"
33449  arguments="${tmp#* }"
33450
33451  # Input might be given as Windows format, start by converting to
33452  # unix format.
33453  new_path=`$CYGPATH -u "$path"`
33454
33455  # Now try to locate executable using which
33456  new_path=`$WHICH "$new_path" 2> /dev/null`
33457  # bat and cmd files are not always considered executable in cygwin causing which
33458  # to not find them
33459  if test "x$new_path" = x \
33460      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33461      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33462    new_path=`$CYGPATH -u "$path"`
33463  fi
33464  if test "x$new_path" = x; then
33465    # Oops. Which didn't find the executable.
33466    # The splitting of arguments from the executable at a space might have been incorrect,
33467    # since paths with space are more likely in Windows. Give it another try with the whole
33468    # argument.
33469    path="$complete"
33470    arguments="EOL"
33471    new_path=`$CYGPATH -u "$path"`
33472    new_path=`$WHICH "$new_path" 2> /dev/null`
33473    # bat and cmd files are not always considered executable in cygwin causing which
33474    # to not find them
33475    if test "x$new_path" = x \
33476        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33477        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33478      new_path=`$CYGPATH -u "$path"`
33479    fi
33480    if test "x$new_path" = x; then
33481      # It's still not found. Now this is an unrecoverable error.
33482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33483$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33484      has_space=`$ECHO "$complete" | $GREP " "`
33485      if test "x$has_space" != x; then
33486        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33487$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33488      fi
33489      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33490    fi
33491  fi
33492
33493  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33494  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33495  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33496  # "foo.exe" is OK but "foo" is an error.
33497  #
33498  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33499  # It is also a way to make sure we got the proper file name for the real test later on.
33500  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33501  if test "x$test_shortpath" = x; then
33502    # Short path failed, file does not exist as specified.
33503    # Try adding .exe or .cmd
33504    if test -f "${new_path}.exe"; then
33505      input_to_shortpath="${new_path}.exe"
33506    elif test -f "${new_path}.cmd"; then
33507      input_to_shortpath="${new_path}.cmd"
33508    else
33509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33510$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33511      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33512$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33513      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33514    fi
33515  else
33516    input_to_shortpath="$new_path"
33517  fi
33518
33519  # Call helper function which possibly converts this using DOS-style short mode.
33520  # If so, the updated path is stored in $new_path.
33521  new_path="$input_to_shortpath"
33522
33523  input_path="$input_to_shortpath"
33524  # Check if we need to convert this using DOS-style short mode. If the path
33525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33526  # take no chances and rewrite it.
33527  # Note: m4 eats our [], so we need to use [ and ] instead.
33528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33529  if test "x$has_forbidden_chars" != x; then
33530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33531    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33532    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33533    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33534      # Going to short mode and back again did indeed matter. Since short mode is
33535      # case insensitive, let's make it lowercase to improve readability.
33536      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33537      # Now convert it back to Unix-style (cygpath)
33538      input_path=`$CYGPATH -u "$shortmode_path"`
33539      new_path="$input_path"
33540    fi
33541  fi
33542
33543  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33544  if test "x$test_cygdrive_prefix" = x; then
33545    # As a simple fix, exclude /usr/bin since it's not a real path.
33546    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33547      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33548      # a path prefixed by /cygdrive for fixpath to work.
33549      new_path="$CYGWIN_ROOT_PATH$input_path"
33550    fi
33551  fi
33552
33553  # remove trailing .exe if any
33554  new_path="${new_path/%.exe/}"
33555
33556    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33557
33558  # First separate the path from the arguments. This will split at the first
33559  # space.
33560  complete="$CXX"
33561  path="${complete%% *}"
33562  tmp="$complete EOL"
33563  arguments="${tmp#* }"
33564
33565  # Input might be given as Windows format, start by converting to
33566  # unix format.
33567  new_path="$path"
33568
33569  windows_path="$new_path"
33570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33571    unix_path=`$CYGPATH -u "$windows_path"`
33572    new_path="$unix_path"
33573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33575    new_path="$unix_path"
33576  fi
33577
33578
33579  # Now try to locate executable using which
33580  new_path=`$WHICH "$new_path" 2> /dev/null`
33581
33582  if test "x$new_path" = x; then
33583    # Oops. Which didn't find the executable.
33584    # The splitting of arguments from the executable at a space might have been incorrect,
33585    # since paths with space are more likely in Windows. Give it another try with the whole
33586    # argument.
33587    path="$complete"
33588    arguments="EOL"
33589    new_path="$path"
33590
33591  windows_path="$new_path"
33592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33593    unix_path=`$CYGPATH -u "$windows_path"`
33594    new_path="$unix_path"
33595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33597    new_path="$unix_path"
33598  fi
33599
33600
33601    new_path=`$WHICH "$new_path" 2> /dev/null`
33602    # bat and cmd files are not always considered executable in MSYS causing which
33603    # to not find them
33604    if test "x$new_path" = x \
33605        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33606        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33607      new_path="$path"
33608
33609  windows_path="$new_path"
33610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33611    unix_path=`$CYGPATH -u "$windows_path"`
33612    new_path="$unix_path"
33613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33615    new_path="$unix_path"
33616  fi
33617
33618    fi
33619
33620    if test "x$new_path" = x; then
33621      # It's still not found. Now this is an unrecoverable error.
33622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33623$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33624      has_space=`$ECHO "$complete" | $GREP " "`
33625      if test "x$has_space" != x; then
33626        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33627$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33628      fi
33629      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33630    fi
33631  fi
33632
33633  # Now new_path has a complete unix path to the binary
33634  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33635    # Keep paths in /bin as-is, but remove trailing .exe if any
33636    new_path="${new_path/%.exe/}"
33637    # Do not save /bin paths to all_fixpath_prefixes!
33638  else
33639    # Not in mixed or Windows style, start by that.
33640    new_path=`cmd //c echo $new_path`
33641
33642  input_path="$new_path"
33643  # Check if we need to convert this using DOS-style short mode. If the path
33644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33645  # take no chances and rewrite it.
33646  # Note: m4 eats our [], so we need to use [ and ] instead.
33647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33648  if test "x$has_forbidden_chars" != x; then
33649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33650    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33651  fi
33652
33653    # Output is in $new_path
33654
33655  windows_path="$new_path"
33656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33657    unix_path=`$CYGPATH -u "$windows_path"`
33658    new_path="$unix_path"
33659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33661    new_path="$unix_path"
33662  fi
33663
33664    # remove trailing .exe if any
33665    new_path="${new_path/%.exe/}"
33666
33667    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33668    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33669  fi
33670
33671    else
33672      # We're on a unix platform. Hooray! :)
33673      # First separate the path from the arguments. This will split at the first
33674      # space.
33675      complete="$CXX"
33676      path="${complete%% *}"
33677      tmp="$complete EOL"
33678      arguments="${tmp#* }"
33679
33680      # Cannot rely on the command "which" here since it doesn't always work.
33681      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33682      if test -z "$is_absolute_path"; then
33683        # Path to executable is not absolute. Find it.
33684        IFS_save="$IFS"
33685        IFS=:
33686        for p in $PATH; do
33687          if test -f "$p/$path" && test -x "$p/$path"; then
33688            new_path="$p/$path"
33689            break
33690          fi
33691        done
33692        IFS="$IFS_save"
33693      else
33694        # This is an absolute path, we can use it without further modifications.
33695        new_path="$path"
33696      fi
33697
33698      if test "x$new_path" = x; then
33699        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33700$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33701        has_space=`$ECHO "$complete" | $GREP " "`
33702        if test "x$has_space" != x; then
33703          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33704$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33705        fi
33706        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33707      fi
33708    fi
33709
33710    # Now join together the path and the arguments once again
33711    if test "x$arguments" != xEOL; then
33712      new_complete="$new_path ${arguments% *}"
33713    else
33714      new_complete="$new_path"
33715    fi
33716
33717    if test "x$complete" != "x$new_complete"; then
33718      CXX="$new_complete"
33719      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33720$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33721    fi
33722  fi
33723
33724  TEST_COMPILER="$CXX"
33725  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33726  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33727  if test "x$OPENJDK_BUILD_OS" != xaix; then
33728    # FIXME: This test should not be needed anymore; we don't do that for any platform.
33729    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33730$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33731
33732  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33733    # Follow a chain of symbolic links. Use readlink
33734    # where it exists, else fall back to horribly
33735    # complicated shell code.
33736    if test "x$READLINK_TESTED" != yes; then
33737      # On MacOSX there is a readlink tool with a different
33738      # purpose than the GNU readlink tool. Check the found readlink.
33739      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33740      if test "x$ISGNU" = x; then
33741        # A readlink that we do not know how to use.
33742        # Are there other non-GNU readlinks out there?
33743        READLINK_TESTED=yes
33744        READLINK=
33745      fi
33746    fi
33747
33748    if test "x$READLINK" != x; then
33749      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33750    else
33751      # Save the current directory for restoring afterwards
33752      STARTDIR=$PWD
33753      COUNTER=0
33754      sym_link_dir=`$DIRNAME $TEST_COMPILER`
33755      sym_link_file=`$BASENAME $TEST_COMPILER`
33756      cd $sym_link_dir
33757      # Use -P flag to resolve symlinks in directories.
33758      cd `$THEPWDCMD -P`
33759      sym_link_dir=`$THEPWDCMD -P`
33760      # Resolve file symlinks
33761      while test $COUNTER -lt 20; do
33762        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33763        if test "x$ISLINK" == x; then
33764          # This is not a symbolic link! We are done!
33765          break
33766        fi
33767        # Again resolve directory symlinks since the target of the just found
33768        # link could be in a different directory
33769        cd `$DIRNAME $ISLINK`
33770        sym_link_dir=`$THEPWDCMD -P`
33771        sym_link_file=`$BASENAME $ISLINK`
33772        let COUNTER=COUNTER+1
33773      done
33774      cd $STARTDIR
33775      TEST_COMPILER=$sym_link_dir/$sym_link_file
33776    fi
33777  fi
33778
33779    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33780$as_echo "$TEST_COMPILER" >&6; }
33781  fi
33782  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33783$as_echo_n "checking if CXX is disguised ccache... " >&6; }
33784
33785  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33786  if test "x$COMPILER_BASENAME" = "xccache"; then
33787    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33788$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33789    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33790    # We want to control ccache invocation ourselves, so ignore this cc and try
33791    # searching again.
33792
33793    # Remove the path to the fake ccache cc from the PATH
33794    RETRY_COMPILER_SAVED_PATH="$PATH"
33795    COMPILER_DIRNAME=`$DIRNAME $CXX`
33796    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33797
33798    # Try again looking for our compiler
33799    if test -n "$ac_tool_prefix"; then
33800  for ac_prog in $TOOLCHAIN_CXX_BINARY
33801  do
33802    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33803set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33805$as_echo_n "checking for $ac_word... " >&6; }
33806if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33807  $as_echo_n "(cached) " >&6
33808else
33809  if test -n "$PROPER_COMPILER_CXX"; then
33810  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33811else
33812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33813for as_dir in $PATH
33814do
33815  IFS=$as_save_IFS
33816  test -z "$as_dir" && as_dir=.
33817    for ac_exec_ext in '' $ac_executable_extensions; do
33818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33819    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33821    break 2
33822  fi
33823done
33824  done
33825IFS=$as_save_IFS
33826
33827fi
33828fi
33829PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33830if test -n "$PROPER_COMPILER_CXX"; then
33831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33832$as_echo "$PROPER_COMPILER_CXX" >&6; }
33833else
33834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33835$as_echo "no" >&6; }
33836fi
33837
33838
33839    test -n "$PROPER_COMPILER_CXX" && break
33840  done
33841fi
33842if test -z "$PROPER_COMPILER_CXX"; then
33843  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33844  for ac_prog in $TOOLCHAIN_CXX_BINARY
33845do
33846  # Extract the first word of "$ac_prog", so it can be a program name with args.
33847set dummy $ac_prog; ac_word=$2
33848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33849$as_echo_n "checking for $ac_word... " >&6; }
33850if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33851  $as_echo_n "(cached) " >&6
33852else
33853  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33854  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33855else
33856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33857for as_dir in $PATH
33858do
33859  IFS=$as_save_IFS
33860  test -z "$as_dir" && as_dir=.
33861    for ac_exec_ext in '' $ac_executable_extensions; do
33862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33863    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33865    break 2
33866  fi
33867done
33868  done
33869IFS=$as_save_IFS
33870
33871fi
33872fi
33873ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33874if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33876$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33877else
33878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33879$as_echo "no" >&6; }
33880fi
33881
33882
33883  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33884done
33885
33886  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33887    PROPER_COMPILER_CXX=""
33888  else
33889    case $cross_compiling:$ac_tool_warned in
33890yes:)
33891{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33892$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33893ac_tool_warned=yes ;;
33894esac
33895    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33896  fi
33897fi
33898
33899
33900  # Only process if variable expands to non-empty
33901
33902  if test "x$PROPER_COMPILER_CXX" != x; then
33903    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33904
33905  # First separate the path from the arguments. This will split at the first
33906  # space.
33907  complete="$PROPER_COMPILER_CXX"
33908  path="${complete%% *}"
33909  tmp="$complete EOL"
33910  arguments="${tmp#* }"
33911
33912  # Input might be given as Windows format, start by converting to
33913  # unix format.
33914  new_path=`$CYGPATH -u "$path"`
33915
33916  # Now try to locate executable using which
33917  new_path=`$WHICH "$new_path" 2> /dev/null`
33918  # bat and cmd files are not always considered executable in cygwin causing which
33919  # to not find them
33920  if test "x$new_path" = x \
33921      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33922      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33923    new_path=`$CYGPATH -u "$path"`
33924  fi
33925  if test "x$new_path" = x; then
33926    # Oops. Which didn't find the executable.
33927    # The splitting of arguments from the executable at a space might have been incorrect,
33928    # since paths with space are more likely in Windows. Give it another try with the whole
33929    # argument.
33930    path="$complete"
33931    arguments="EOL"
33932    new_path=`$CYGPATH -u "$path"`
33933    new_path=`$WHICH "$new_path" 2> /dev/null`
33934    # bat and cmd files are not always considered executable in cygwin causing which
33935    # to not find them
33936    if test "x$new_path" = x \
33937        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33938        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33939      new_path=`$CYGPATH -u "$path"`
33940    fi
33941    if test "x$new_path" = x; then
33942      # It's still not found. Now this is an unrecoverable error.
33943      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33944$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33945      has_space=`$ECHO "$complete" | $GREP " "`
33946      if test "x$has_space" != x; then
33947        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33948$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33949      fi
33950      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33951    fi
33952  fi
33953
33954  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33955  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33956  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33957  # "foo.exe" is OK but "foo" is an error.
33958  #
33959  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33960  # It is also a way to make sure we got the proper file name for the real test later on.
33961  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33962  if test "x$test_shortpath" = x; then
33963    # Short path failed, file does not exist as specified.
33964    # Try adding .exe or .cmd
33965    if test -f "${new_path}.exe"; then
33966      input_to_shortpath="${new_path}.exe"
33967    elif test -f "${new_path}.cmd"; then
33968      input_to_shortpath="${new_path}.cmd"
33969    else
33970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
33971$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
33972      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33973$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33974      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33975    fi
33976  else
33977    input_to_shortpath="$new_path"
33978  fi
33979
33980  # Call helper function which possibly converts this using DOS-style short mode.
33981  # If so, the updated path is stored in $new_path.
33982  new_path="$input_to_shortpath"
33983
33984  input_path="$input_to_shortpath"
33985  # Check if we need to convert this using DOS-style short mode. If the path
33986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33987  # take no chances and rewrite it.
33988  # Note: m4 eats our [], so we need to use [ and ] instead.
33989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33990  if test "x$has_forbidden_chars" != x; then
33991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33992    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33993    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33994    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33995      # Going to short mode and back again did indeed matter. Since short mode is
33996      # case insensitive, let's make it lowercase to improve readability.
33997      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33998      # Now convert it back to Unix-style (cygpath)
33999      input_path=`$CYGPATH -u "$shortmode_path"`
34000      new_path="$input_path"
34001    fi
34002  fi
34003
34004  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34005  if test "x$test_cygdrive_prefix" = x; then
34006    # As a simple fix, exclude /usr/bin since it's not a real path.
34007    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34008      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34009      # a path prefixed by /cygdrive for fixpath to work.
34010      new_path="$CYGWIN_ROOT_PATH$input_path"
34011    fi
34012  fi
34013
34014  # remove trailing .exe if any
34015  new_path="${new_path/%.exe/}"
34016
34017    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34018
34019  # First separate the path from the arguments. This will split at the first
34020  # space.
34021  complete="$PROPER_COMPILER_CXX"
34022  path="${complete%% *}"
34023  tmp="$complete EOL"
34024  arguments="${tmp#* }"
34025
34026  # Input might be given as Windows format, start by converting to
34027  # unix format.
34028  new_path="$path"
34029
34030  windows_path="$new_path"
34031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34032    unix_path=`$CYGPATH -u "$windows_path"`
34033    new_path="$unix_path"
34034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34036    new_path="$unix_path"
34037  fi
34038
34039
34040  # Now try to locate executable using which
34041  new_path=`$WHICH "$new_path" 2> /dev/null`
34042
34043  if test "x$new_path" = x; then
34044    # Oops. Which didn't find the executable.
34045    # The splitting of arguments from the executable at a space might have been incorrect,
34046    # since paths with space are more likely in Windows. Give it another try with the whole
34047    # argument.
34048    path="$complete"
34049    arguments="EOL"
34050    new_path="$path"
34051
34052  windows_path="$new_path"
34053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34054    unix_path=`$CYGPATH -u "$windows_path"`
34055    new_path="$unix_path"
34056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34058    new_path="$unix_path"
34059  fi
34060
34061
34062    new_path=`$WHICH "$new_path" 2> /dev/null`
34063    # bat and cmd files are not always considered executable in MSYS causing which
34064    # to not find them
34065    if test "x$new_path" = x \
34066        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34067        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34068      new_path="$path"
34069
34070  windows_path="$new_path"
34071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34072    unix_path=`$CYGPATH -u "$windows_path"`
34073    new_path="$unix_path"
34074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34076    new_path="$unix_path"
34077  fi
34078
34079    fi
34080
34081    if test "x$new_path" = x; then
34082      # It's still not found. Now this is an unrecoverable error.
34083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
34084$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
34085      has_space=`$ECHO "$complete" | $GREP " "`
34086      if test "x$has_space" != x; then
34087        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34088$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34089      fi
34090      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
34091    fi
34092  fi
34093
34094  # Now new_path has a complete unix path to the binary
34095  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34096    # Keep paths in /bin as-is, but remove trailing .exe if any
34097    new_path="${new_path/%.exe/}"
34098    # Do not save /bin paths to all_fixpath_prefixes!
34099  else
34100    # Not in mixed or Windows style, start by that.
34101    new_path=`cmd //c echo $new_path`
34102
34103  input_path="$new_path"
34104  # Check if we need to convert this using DOS-style short mode. If the path
34105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34106  # take no chances and rewrite it.
34107  # Note: m4 eats our [], so we need to use [ and ] instead.
34108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34109  if test "x$has_forbidden_chars" != x; then
34110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34111    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34112  fi
34113
34114    # Output is in $new_path
34115
34116  windows_path="$new_path"
34117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34118    unix_path=`$CYGPATH -u "$windows_path"`
34119    new_path="$unix_path"
34120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34122    new_path="$unix_path"
34123  fi
34124
34125    # remove trailing .exe if any
34126    new_path="${new_path/%.exe/}"
34127
34128    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34129    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34130  fi
34131
34132    else
34133      # We're on a unix platform. Hooray! :)
34134      # First separate the path from the arguments. This will split at the first
34135      # space.
34136      complete="$PROPER_COMPILER_CXX"
34137      path="${complete%% *}"
34138      tmp="$complete EOL"
34139      arguments="${tmp#* }"
34140
34141      # Cannot rely on the command "which" here since it doesn't always work.
34142      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34143      if test -z "$is_absolute_path"; then
34144        # Path to executable is not absolute. Find it.
34145        IFS_save="$IFS"
34146        IFS=:
34147        for p in $PATH; do
34148          if test -f "$p/$path" && test -x "$p/$path"; then
34149            new_path="$p/$path"
34150            break
34151          fi
34152        done
34153        IFS="$IFS_save"
34154      else
34155        # This is an absolute path, we can use it without further modifications.
34156        new_path="$path"
34157      fi
34158
34159      if test "x$new_path" = x; then
34160        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
34161$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
34162        has_space=`$ECHO "$complete" | $GREP " "`
34163        if test "x$has_space" != x; then
34164          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34165$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34166        fi
34167        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
34168      fi
34169    fi
34170
34171    # Now join together the path and the arguments once again
34172    if test "x$arguments" != xEOL; then
34173      new_complete="$new_path ${arguments% *}"
34174    else
34175      new_complete="$new_path"
34176    fi
34177
34178    if test "x$complete" != "x$new_complete"; then
34179      PROPER_COMPILER_CXX="$new_complete"
34180      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
34181$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
34182    fi
34183  fi
34184
34185    PATH="$RETRY_COMPILER_SAVED_PATH"
34186
34187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
34188$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
34189
34190  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34191    # Follow a chain of symbolic links. Use readlink
34192    # where it exists, else fall back to horribly
34193    # complicated shell code.
34194    if test "x$READLINK_TESTED" != yes; then
34195      # On MacOSX there is a readlink tool with a different
34196      # purpose than the GNU readlink tool. Check the found readlink.
34197      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34198      if test "x$ISGNU" = x; then
34199        # A readlink that we do not know how to use.
34200        # Are there other non-GNU readlinks out there?
34201        READLINK_TESTED=yes
34202        READLINK=
34203      fi
34204    fi
34205
34206    if test "x$READLINK" != x; then
34207      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
34208    else
34209      # Save the current directory for restoring afterwards
34210      STARTDIR=$PWD
34211      COUNTER=0
34212      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
34213      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
34214      cd $sym_link_dir
34215      # Use -P flag to resolve symlinks in directories.
34216      cd `$THEPWDCMD -P`
34217      sym_link_dir=`$THEPWDCMD -P`
34218      # Resolve file symlinks
34219      while test $COUNTER -lt 20; do
34220        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34221        if test "x$ISLINK" == x; then
34222          # This is not a symbolic link! We are done!
34223          break
34224        fi
34225        # Again resolve directory symlinks since the target of the just found
34226        # link could be in a different directory
34227        cd `$DIRNAME $ISLINK`
34228        sym_link_dir=`$THEPWDCMD -P`
34229        sym_link_file=`$BASENAME $ISLINK`
34230        let COUNTER=COUNTER+1
34231      done
34232      cd $STARTDIR
34233      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
34234    fi
34235  fi
34236
34237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
34238$as_echo "$PROPER_COMPILER_CXX" >&6; }
34239    CXX="$PROPER_COMPILER_CXX"
34240  else
34241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
34242$as_echo "no, keeping CXX" >&6; }
34243  fi
34244
34245
34246  COMPILER=$CXX
34247  COMPILER_NAME=$COMPILER_NAME
34248
34249  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34250    # cc -V output typically looks like
34251    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34252    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34253    # Check that this is likely to be the Solaris Studio cc.
34254    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34255    if test $? -ne 0; then
34256      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34257      { $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
34258$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34259      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34260$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34261      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34262$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34263      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34264    fi
34265    # Remove usage instructions (if present), and
34266    # collapse compiler output into a single line
34267    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34268        $SED -e 's/ *[Uu]sage:.*//'`
34269    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34270        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34271  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34272    # xlc -qversion output typically looks like
34273    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34274    #     Version: 11.01.0000.0015
34275    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34276    # Check that this is likely to be the IBM XL C compiler.
34277    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34278    if test $? -ne 0; then
34279      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34280      { $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
34281$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34282      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34283$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34284      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34285$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34286      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34287    fi
34288    # Collapse compiler output into a single line
34289    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34290    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34291        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34292  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34293    # There is no specific version flag, but all output starts with a version string.
34294    # First line typically looks something like:
34295    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34296    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34297    # Check that this is likely to be Microsoft CL.EXE.
34298    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34299    if test $? -ne 0; then
34300      { $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
34301$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34302      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34303$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34304      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34305    fi
34306    # Collapse compiler output into a single line
34307    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34308    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34309        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34310  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34311    # gcc --version output typically looks like
34312    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34313    #     Copyright (C) 2013 Free Software Foundation, Inc.
34314    #     This is free software; see the source for copying conditions.  There is NO
34315    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34316    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34317    # Check that this is likely to be GCC.
34318    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34319    if test $? -ne 0; then
34320      { $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
34321$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34322      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34323$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34324      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34325    fi
34326    # Remove Copyright and legalese from version string, and
34327    # collapse into a single line
34328    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34329        $SED -e 's/ *Copyright .*//'`
34330    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34331        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
34332  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34333    # clang --version output typically looks like
34334    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34335    #    clang version 3.3 (tags/RELEASE_33/final)
34336    # or
34337    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34338    #    Target: x86_64-pc-linux-gnu
34339    #    Thread model: posix
34340    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34341    # Check that this is likely to be clang
34342    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34343    if test $? -ne 0; then
34344      { $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
34345$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34346      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34347$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34348      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34349    fi
34350    # Collapse compiler output into a single line
34351    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34352    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34353        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
34354  else
34355      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34356  fi
34357  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34358  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34359  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34360  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34361
34362  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34363$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34364
34365
34366  # Now that we have resolved CXX ourself, let autoconf have its go at it
34367  ac_ext=cpp
34368ac_cpp='$CXXCPP $CPPFLAGS'
34369ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34370ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34371ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34372if test -z "$CXX"; then
34373  if test -n "$CCC"; then
34374    CXX=$CCC
34375  else
34376    if test -n "$ac_tool_prefix"; then
34377  for ac_prog in $CXX
34378  do
34379    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34380set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34382$as_echo_n "checking for $ac_word... " >&6; }
34383if ${ac_cv_prog_CXX+:} false; then :
34384  $as_echo_n "(cached) " >&6
34385else
34386  if test -n "$CXX"; then
34387  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34388else
34389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34390for as_dir in $PATH
34391do
34392  IFS=$as_save_IFS
34393  test -z "$as_dir" && as_dir=.
34394    for ac_exec_ext in '' $ac_executable_extensions; do
34395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34396    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34398    break 2
34399  fi
34400done
34401  done
34402IFS=$as_save_IFS
34403
34404fi
34405fi
34406CXX=$ac_cv_prog_CXX
34407if test -n "$CXX"; then
34408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34409$as_echo "$CXX" >&6; }
34410else
34411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34412$as_echo "no" >&6; }
34413fi
34414
34415
34416    test -n "$CXX" && break
34417  done
34418fi
34419if test -z "$CXX"; then
34420  ac_ct_CXX=$CXX
34421  for ac_prog in $CXX
34422do
34423  # Extract the first word of "$ac_prog", so it can be a program name with args.
34424set dummy $ac_prog; ac_word=$2
34425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34426$as_echo_n "checking for $ac_word... " >&6; }
34427if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34428  $as_echo_n "(cached) " >&6
34429else
34430  if test -n "$ac_ct_CXX"; then
34431  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34432else
34433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34434for as_dir in $PATH
34435do
34436  IFS=$as_save_IFS
34437  test -z "$as_dir" && as_dir=.
34438    for ac_exec_ext in '' $ac_executable_extensions; do
34439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34440    ac_cv_prog_ac_ct_CXX="$ac_prog"
34441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34442    break 2
34443  fi
34444done
34445  done
34446IFS=$as_save_IFS
34447
34448fi
34449fi
34450ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34451if test -n "$ac_ct_CXX"; then
34452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34453$as_echo "$ac_ct_CXX" >&6; }
34454else
34455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34456$as_echo "no" >&6; }
34457fi
34458
34459
34460  test -n "$ac_ct_CXX" && break
34461done
34462
34463  if test "x$ac_ct_CXX" = x; then
34464    CXX="g++"
34465  else
34466    case $cross_compiling:$ac_tool_warned in
34467yes:)
34468{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34469$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34470ac_tool_warned=yes ;;
34471esac
34472    CXX=$ac_ct_CXX
34473  fi
34474fi
34475
34476  fi
34477fi
34478# Provide some information about the compiler.
34479$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34480set X $ac_compile
34481ac_compiler=$2
34482for ac_option in --version -v -V -qversion; do
34483  { { ac_try="$ac_compiler $ac_option >&5"
34484case "(($ac_try" in
34485  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34486  *) ac_try_echo=$ac_try;;
34487esac
34488eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34489$as_echo "$ac_try_echo"; } >&5
34490  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34491  ac_status=$?
34492  if test -s conftest.err; then
34493    sed '10a\
34494... rest of stderr output deleted ...
34495         10q' conftest.err >conftest.er1
34496    cat conftest.er1 >&5
34497  fi
34498  rm -f conftest.er1 conftest.err
34499  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34500  test $ac_status = 0; }
34501done
34502
34503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34504$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34505if ${ac_cv_cxx_compiler_gnu+:} false; then :
34506  $as_echo_n "(cached) " >&6
34507else
34508  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34509/* end confdefs.h.  */
34510
34511int
34512main ()
34513{
34514#ifndef __GNUC__
34515       choke me
34516#endif
34517
34518  ;
34519  return 0;
34520}
34521_ACEOF
34522if ac_fn_cxx_try_compile "$LINENO"; then :
34523  ac_compiler_gnu=yes
34524else
34525  ac_compiler_gnu=no
34526fi
34527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34528ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34529
34530fi
34531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34532$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34533if test $ac_compiler_gnu = yes; then
34534  GXX=yes
34535else
34536  GXX=
34537fi
34538ac_test_CXXFLAGS=${CXXFLAGS+set}
34539ac_save_CXXFLAGS=$CXXFLAGS
34540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34541$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34542if ${ac_cv_prog_cxx_g+:} false; then :
34543  $as_echo_n "(cached) " >&6
34544else
34545  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34546   ac_cxx_werror_flag=yes
34547   ac_cv_prog_cxx_g=no
34548   CXXFLAGS="-g"
34549   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34550/* end confdefs.h.  */
34551
34552int
34553main ()
34554{
34555
34556  ;
34557  return 0;
34558}
34559_ACEOF
34560if ac_fn_cxx_try_compile "$LINENO"; then :
34561  ac_cv_prog_cxx_g=yes
34562else
34563  CXXFLAGS=""
34564      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34565/* end confdefs.h.  */
34566
34567int
34568main ()
34569{
34570
34571  ;
34572  return 0;
34573}
34574_ACEOF
34575if ac_fn_cxx_try_compile "$LINENO"; then :
34576
34577else
34578  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34579	 CXXFLAGS="-g"
34580	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34581/* end confdefs.h.  */
34582
34583int
34584main ()
34585{
34586
34587  ;
34588  return 0;
34589}
34590_ACEOF
34591if ac_fn_cxx_try_compile "$LINENO"; then :
34592  ac_cv_prog_cxx_g=yes
34593fi
34594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34595fi
34596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34597fi
34598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34599   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34600fi
34601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34602$as_echo "$ac_cv_prog_cxx_g" >&6; }
34603if test "$ac_test_CXXFLAGS" = set; then
34604  CXXFLAGS=$ac_save_CXXFLAGS
34605elif test $ac_cv_prog_cxx_g = yes; then
34606  if test "$GXX" = yes; then
34607    CXXFLAGS="-g -O2"
34608  else
34609    CXXFLAGS="-g"
34610  fi
34611else
34612  if test "$GXX" = yes; then
34613    CXXFLAGS="-O2"
34614  else
34615    CXXFLAGS=
34616  fi
34617fi
34618ac_ext=cpp
34619ac_cpp='$CXXCPP $CPPFLAGS'
34620ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34621ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34622ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34623
34624
34625  #
34626  # Setup the preprocessor (CPP and CXXCPP)
34627  #
34628  ac_ext=c
34629ac_cpp='$CPP $CPPFLAGS'
34630ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34631ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34632ac_compiler_gnu=$ac_cv_c_compiler_gnu
34633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34634$as_echo_n "checking how to run the C preprocessor... " >&6; }
34635# On Suns, sometimes $CPP names a directory.
34636if test -n "$CPP" && test -d "$CPP"; then
34637  CPP=
34638fi
34639if test -z "$CPP"; then
34640  if ${ac_cv_prog_CPP+:} false; then :
34641  $as_echo_n "(cached) " >&6
34642else
34643      # Double quotes because CPP needs to be expanded
34644    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34645    do
34646      ac_preproc_ok=false
34647for ac_c_preproc_warn_flag in '' yes
34648do
34649  # Use a header file that comes with gcc, so configuring glibc
34650  # with a fresh cross-compiler works.
34651  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34652  # <limits.h> exists even on freestanding compilers.
34653  # On the NeXT, cc -E runs the code through the compiler's parser,
34654  # not just through cpp. "Syntax error" is here to catch this case.
34655  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34656/* end confdefs.h.  */
34657#ifdef __STDC__
34658# include <limits.h>
34659#else
34660# include <assert.h>
34661#endif
34662		     Syntax error
34663_ACEOF
34664if ac_fn_c_try_cpp "$LINENO"; then :
34665
34666else
34667  # Broken: fails on valid input.
34668continue
34669fi
34670rm -f conftest.err conftest.i conftest.$ac_ext
34671
34672  # OK, works on sane cases.  Now check whether nonexistent headers
34673  # can be detected and how.
34674  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34675/* end confdefs.h.  */
34676#include <ac_nonexistent.h>
34677_ACEOF
34678if ac_fn_c_try_cpp "$LINENO"; then :
34679  # Broken: success on invalid input.
34680continue
34681else
34682  # Passes both tests.
34683ac_preproc_ok=:
34684break
34685fi
34686rm -f conftest.err conftest.i conftest.$ac_ext
34687
34688done
34689# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34690rm -f conftest.i conftest.err conftest.$ac_ext
34691if $ac_preproc_ok; then :
34692  break
34693fi
34694
34695    done
34696    ac_cv_prog_CPP=$CPP
34697
34698fi
34699  CPP=$ac_cv_prog_CPP
34700else
34701  ac_cv_prog_CPP=$CPP
34702fi
34703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34704$as_echo "$CPP" >&6; }
34705ac_preproc_ok=false
34706for ac_c_preproc_warn_flag in '' yes
34707do
34708  # Use a header file that comes with gcc, so configuring glibc
34709  # with a fresh cross-compiler works.
34710  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34711  # <limits.h> exists even on freestanding compilers.
34712  # On the NeXT, cc -E runs the code through the compiler's parser,
34713  # not just through cpp. "Syntax error" is here to catch this case.
34714  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34715/* end confdefs.h.  */
34716#ifdef __STDC__
34717# include <limits.h>
34718#else
34719# include <assert.h>
34720#endif
34721		     Syntax error
34722_ACEOF
34723if ac_fn_c_try_cpp "$LINENO"; then :
34724
34725else
34726  # Broken: fails on valid input.
34727continue
34728fi
34729rm -f conftest.err conftest.i conftest.$ac_ext
34730
34731  # OK, works on sane cases.  Now check whether nonexistent headers
34732  # can be detected and how.
34733  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34734/* end confdefs.h.  */
34735#include <ac_nonexistent.h>
34736_ACEOF
34737if ac_fn_c_try_cpp "$LINENO"; then :
34738  # Broken: success on invalid input.
34739continue
34740else
34741  # Passes both tests.
34742ac_preproc_ok=:
34743break
34744fi
34745rm -f conftest.err conftest.i conftest.$ac_ext
34746
34747done
34748# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34749rm -f conftest.i conftest.err conftest.$ac_ext
34750if $ac_preproc_ok; then :
34751
34752else
34753  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34754$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34755as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34756See \`config.log' for more details" "$LINENO" 5; }
34757fi
34758
34759ac_ext=cpp
34760ac_cpp='$CXXCPP $CPPFLAGS'
34761ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34762ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34763ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34764
34765
34766  # Only process if variable expands to non-empty
34767
34768  if test "x$CPP" != x; then
34769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34770
34771  # First separate the path from the arguments. This will split at the first
34772  # space.
34773  complete="$CPP"
34774  path="${complete%% *}"
34775  tmp="$complete EOL"
34776  arguments="${tmp#* }"
34777
34778  # Input might be given as Windows format, start by converting to
34779  # unix format.
34780  new_path=`$CYGPATH -u "$path"`
34781
34782  # Now try to locate executable using which
34783  new_path=`$WHICH "$new_path" 2> /dev/null`
34784  # bat and cmd files are not always considered executable in cygwin causing which
34785  # to not find them
34786  if test "x$new_path" = x \
34787      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34788      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34789    new_path=`$CYGPATH -u "$path"`
34790  fi
34791  if test "x$new_path" = x; then
34792    # Oops. Which didn't find the executable.
34793    # The splitting of arguments from the executable at a space might have been incorrect,
34794    # since paths with space are more likely in Windows. Give it another try with the whole
34795    # argument.
34796    path="$complete"
34797    arguments="EOL"
34798    new_path=`$CYGPATH -u "$path"`
34799    new_path=`$WHICH "$new_path" 2> /dev/null`
34800    # bat and cmd files are not always considered executable in cygwin causing which
34801    # to not find them
34802    if test "x$new_path" = x \
34803        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34804        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34805      new_path=`$CYGPATH -u "$path"`
34806    fi
34807    if test "x$new_path" = x; then
34808      # It's still not found. Now this is an unrecoverable error.
34809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34810$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34811      has_space=`$ECHO "$complete" | $GREP " "`
34812      if test "x$has_space" != x; then
34813        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34814$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34815      fi
34816      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34817    fi
34818  fi
34819
34820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34823  # "foo.exe" is OK but "foo" is an error.
34824  #
34825  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34826  # It is also a way to make sure we got the proper file name for the real test later on.
34827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34828  if test "x$test_shortpath" = x; then
34829    # Short path failed, file does not exist as specified.
34830    # Try adding .exe or .cmd
34831    if test -f "${new_path}.exe"; then
34832      input_to_shortpath="${new_path}.exe"
34833    elif test -f "${new_path}.cmd"; then
34834      input_to_shortpath="${new_path}.cmd"
34835    else
34836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34837$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34838      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34839$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34840      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34841    fi
34842  else
34843    input_to_shortpath="$new_path"
34844  fi
34845
34846  # Call helper function which possibly converts this using DOS-style short mode.
34847  # If so, the updated path is stored in $new_path.
34848  new_path="$input_to_shortpath"
34849
34850  input_path="$input_to_shortpath"
34851  # Check if we need to convert this using DOS-style short mode. If the path
34852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34853  # take no chances and rewrite it.
34854  # Note: m4 eats our [], so we need to use [ and ] instead.
34855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34856  if test "x$has_forbidden_chars" != x; then
34857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34861      # Going to short mode and back again did indeed matter. Since short mode is
34862      # case insensitive, let's make it lowercase to improve readability.
34863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34864      # Now convert it back to Unix-style (cygpath)
34865      input_path=`$CYGPATH -u "$shortmode_path"`
34866      new_path="$input_path"
34867    fi
34868  fi
34869
34870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34871  if test "x$test_cygdrive_prefix" = x; then
34872    # As a simple fix, exclude /usr/bin since it's not a real path.
34873    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34875      # a path prefixed by /cygdrive for fixpath to work.
34876      new_path="$CYGWIN_ROOT_PATH$input_path"
34877    fi
34878  fi
34879
34880  # remove trailing .exe if any
34881  new_path="${new_path/%.exe/}"
34882
34883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34884
34885  # First separate the path from the arguments. This will split at the first
34886  # space.
34887  complete="$CPP"
34888  path="${complete%% *}"
34889  tmp="$complete EOL"
34890  arguments="${tmp#* }"
34891
34892  # Input might be given as Windows format, start by converting to
34893  # unix format.
34894  new_path="$path"
34895
34896  windows_path="$new_path"
34897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34898    unix_path=`$CYGPATH -u "$windows_path"`
34899    new_path="$unix_path"
34900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34902    new_path="$unix_path"
34903  fi
34904
34905
34906  # Now try to locate executable using which
34907  new_path=`$WHICH "$new_path" 2> /dev/null`
34908
34909  if test "x$new_path" = x; then
34910    # Oops. Which didn't find the executable.
34911    # The splitting of arguments from the executable at a space might have been incorrect,
34912    # since paths with space are more likely in Windows. Give it another try with the whole
34913    # argument.
34914    path="$complete"
34915    arguments="EOL"
34916    new_path="$path"
34917
34918  windows_path="$new_path"
34919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34920    unix_path=`$CYGPATH -u "$windows_path"`
34921    new_path="$unix_path"
34922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34924    new_path="$unix_path"
34925  fi
34926
34927
34928    new_path=`$WHICH "$new_path" 2> /dev/null`
34929    # bat and cmd files are not always considered executable in MSYS causing which
34930    # to not find them
34931    if test "x$new_path" = x \
34932        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34933        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34934      new_path="$path"
34935
34936  windows_path="$new_path"
34937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34938    unix_path=`$CYGPATH -u "$windows_path"`
34939    new_path="$unix_path"
34940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34942    new_path="$unix_path"
34943  fi
34944
34945    fi
34946
34947    if test "x$new_path" = x; then
34948      # It's still not found. Now this is an unrecoverable error.
34949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34950$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34951      has_space=`$ECHO "$complete" | $GREP " "`
34952      if test "x$has_space" != x; then
34953        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34954$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34955      fi
34956      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34957    fi
34958  fi
34959
34960  # Now new_path has a complete unix path to the binary
34961  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34962    # Keep paths in /bin as-is, but remove trailing .exe if any
34963    new_path="${new_path/%.exe/}"
34964    # Do not save /bin paths to all_fixpath_prefixes!
34965  else
34966    # Not in mixed or Windows style, start by that.
34967    new_path=`cmd //c echo $new_path`
34968
34969  input_path="$new_path"
34970  # Check if we need to convert this using DOS-style short mode. If the path
34971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34972  # take no chances and rewrite it.
34973  # Note: m4 eats our [], so we need to use [ and ] instead.
34974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34975  if test "x$has_forbidden_chars" != x; then
34976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34977    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34978  fi
34979
34980    # Output is in $new_path
34981
34982  windows_path="$new_path"
34983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34984    unix_path=`$CYGPATH -u "$windows_path"`
34985    new_path="$unix_path"
34986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34988    new_path="$unix_path"
34989  fi
34990
34991    # remove trailing .exe if any
34992    new_path="${new_path/%.exe/}"
34993
34994    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34995    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34996  fi
34997
34998    else
34999      # We're on a unix platform. Hooray! :)
35000      # First separate the path from the arguments. This will split at the first
35001      # space.
35002      complete="$CPP"
35003      path="${complete%% *}"
35004      tmp="$complete EOL"
35005      arguments="${tmp#* }"
35006
35007      # Cannot rely on the command "which" here since it doesn't always work.
35008      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35009      if test -z "$is_absolute_path"; then
35010        # Path to executable is not absolute. Find it.
35011        IFS_save="$IFS"
35012        IFS=:
35013        for p in $PATH; do
35014          if test -f "$p/$path" && test -x "$p/$path"; then
35015            new_path="$p/$path"
35016            break
35017          fi
35018        done
35019        IFS="$IFS_save"
35020      else
35021        # This is an absolute path, we can use it without further modifications.
35022        new_path="$path"
35023      fi
35024
35025      if test "x$new_path" = x; then
35026        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35027$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35028        has_space=`$ECHO "$complete" | $GREP " "`
35029        if test "x$has_space" != x; then
35030          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35031$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35032        fi
35033        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35034      fi
35035    fi
35036
35037    # Now join together the path and the arguments once again
35038    if test "x$arguments" != xEOL; then
35039      new_complete="$new_path ${arguments% *}"
35040    else
35041      new_complete="$new_path"
35042    fi
35043
35044    if test "x$complete" != "x$new_complete"; then
35045      CPP="$new_complete"
35046      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35047$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35048    fi
35049  fi
35050
35051  ac_ext=cpp
35052ac_cpp='$CXXCPP $CPPFLAGS'
35053ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35054ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35055ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35057$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35058if test -z "$CXXCPP"; then
35059  if ${ac_cv_prog_CXXCPP+:} false; then :
35060  $as_echo_n "(cached) " >&6
35061else
35062      # Double quotes because CXXCPP needs to be expanded
35063    for CXXCPP in "$CXX -E" "/lib/cpp"
35064    do
35065      ac_preproc_ok=false
35066for ac_cxx_preproc_warn_flag in '' yes
35067do
35068  # Use a header file that comes with gcc, so configuring glibc
35069  # with a fresh cross-compiler works.
35070  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35071  # <limits.h> exists even on freestanding compilers.
35072  # On the NeXT, cc -E runs the code through the compiler's parser,
35073  # not just through cpp. "Syntax error" is here to catch this case.
35074  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35075/* end confdefs.h.  */
35076#ifdef __STDC__
35077# include <limits.h>
35078#else
35079# include <assert.h>
35080#endif
35081		     Syntax error
35082_ACEOF
35083if ac_fn_cxx_try_cpp "$LINENO"; then :
35084
35085else
35086  # Broken: fails on valid input.
35087continue
35088fi
35089rm -f conftest.err conftest.i conftest.$ac_ext
35090
35091  # OK, works on sane cases.  Now check whether nonexistent headers
35092  # can be detected and how.
35093  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35094/* end confdefs.h.  */
35095#include <ac_nonexistent.h>
35096_ACEOF
35097if ac_fn_cxx_try_cpp "$LINENO"; then :
35098  # Broken: success on invalid input.
35099continue
35100else
35101  # Passes both tests.
35102ac_preproc_ok=:
35103break
35104fi
35105rm -f conftest.err conftest.i conftest.$ac_ext
35106
35107done
35108# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35109rm -f conftest.i conftest.err conftest.$ac_ext
35110if $ac_preproc_ok; then :
35111  break
35112fi
35113
35114    done
35115    ac_cv_prog_CXXCPP=$CXXCPP
35116
35117fi
35118  CXXCPP=$ac_cv_prog_CXXCPP
35119else
35120  ac_cv_prog_CXXCPP=$CXXCPP
35121fi
35122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35123$as_echo "$CXXCPP" >&6; }
35124ac_preproc_ok=false
35125for ac_cxx_preproc_warn_flag in '' yes
35126do
35127  # Use a header file that comes with gcc, so configuring glibc
35128  # with a fresh cross-compiler works.
35129  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35130  # <limits.h> exists even on freestanding compilers.
35131  # On the NeXT, cc -E runs the code through the compiler's parser,
35132  # not just through cpp. "Syntax error" is here to catch this case.
35133  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35134/* end confdefs.h.  */
35135#ifdef __STDC__
35136# include <limits.h>
35137#else
35138# include <assert.h>
35139#endif
35140		     Syntax error
35141_ACEOF
35142if ac_fn_cxx_try_cpp "$LINENO"; then :
35143
35144else
35145  # Broken: fails on valid input.
35146continue
35147fi
35148rm -f conftest.err conftest.i conftest.$ac_ext
35149
35150  # OK, works on sane cases.  Now check whether nonexistent headers
35151  # can be detected and how.
35152  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35153/* end confdefs.h.  */
35154#include <ac_nonexistent.h>
35155_ACEOF
35156if ac_fn_cxx_try_cpp "$LINENO"; then :
35157  # Broken: success on invalid input.
35158continue
35159else
35160  # Passes both tests.
35161ac_preproc_ok=:
35162break
35163fi
35164rm -f conftest.err conftest.i conftest.$ac_ext
35165
35166done
35167# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35168rm -f conftest.i conftest.err conftest.$ac_ext
35169if $ac_preproc_ok; then :
35170
35171else
35172  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35173$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35174as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35175See \`config.log' for more details" "$LINENO" 5; }
35176fi
35177
35178ac_ext=cpp
35179ac_cpp='$CXXCPP $CPPFLAGS'
35180ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35181ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35182ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35183
35184
35185  # Only process if variable expands to non-empty
35186
35187  if test "x$CXXCPP" != x; then
35188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35189
35190  # First separate the path from the arguments. This will split at the first
35191  # space.
35192  complete="$CXXCPP"
35193  path="${complete%% *}"
35194  tmp="$complete EOL"
35195  arguments="${tmp#* }"
35196
35197  # Input might be given as Windows format, start by converting to
35198  # unix format.
35199  new_path=`$CYGPATH -u "$path"`
35200
35201  # Now try to locate executable using which
35202  new_path=`$WHICH "$new_path" 2> /dev/null`
35203  # bat and cmd files are not always considered executable in cygwin causing which
35204  # to not find them
35205  if test "x$new_path" = x \
35206      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35207      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35208    new_path=`$CYGPATH -u "$path"`
35209  fi
35210  if test "x$new_path" = x; then
35211    # Oops. Which didn't find the executable.
35212    # The splitting of arguments from the executable at a space might have been incorrect,
35213    # since paths with space are more likely in Windows. Give it another try with the whole
35214    # argument.
35215    path="$complete"
35216    arguments="EOL"
35217    new_path=`$CYGPATH -u "$path"`
35218    new_path=`$WHICH "$new_path" 2> /dev/null`
35219    # bat and cmd files are not always considered executable in cygwin causing which
35220    # to not find them
35221    if test "x$new_path" = x \
35222        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35223        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35224      new_path=`$CYGPATH -u "$path"`
35225    fi
35226    if test "x$new_path" = x; then
35227      # It's still not found. Now this is an unrecoverable error.
35228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35229$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35230      has_space=`$ECHO "$complete" | $GREP " "`
35231      if test "x$has_space" != x; then
35232        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35234      fi
35235      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35236    fi
35237  fi
35238
35239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35242  # "foo.exe" is OK but "foo" is an error.
35243  #
35244  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35245  # It is also a way to make sure we got the proper file name for the real test later on.
35246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35247  if test "x$test_shortpath" = x; then
35248    # Short path failed, file does not exist as specified.
35249    # Try adding .exe or .cmd
35250    if test -f "${new_path}.exe"; then
35251      input_to_shortpath="${new_path}.exe"
35252    elif test -f "${new_path}.cmd"; then
35253      input_to_shortpath="${new_path}.cmd"
35254    else
35255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35256$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35257      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35258$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35259      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35260    fi
35261  else
35262    input_to_shortpath="$new_path"
35263  fi
35264
35265  # Call helper function which possibly converts this using DOS-style short mode.
35266  # If so, the updated path is stored in $new_path.
35267  new_path="$input_to_shortpath"
35268
35269  input_path="$input_to_shortpath"
35270  # Check if we need to convert this using DOS-style short mode. If the path
35271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35272  # take no chances and rewrite it.
35273  # Note: m4 eats our [], so we need to use [ and ] instead.
35274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35275  if test "x$has_forbidden_chars" != x; then
35276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35280      # Going to short mode and back again did indeed matter. Since short mode is
35281      # case insensitive, let's make it lowercase to improve readability.
35282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35283      # Now convert it back to Unix-style (cygpath)
35284      input_path=`$CYGPATH -u "$shortmode_path"`
35285      new_path="$input_path"
35286    fi
35287  fi
35288
35289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35290  if test "x$test_cygdrive_prefix" = x; then
35291    # As a simple fix, exclude /usr/bin since it's not a real path.
35292    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35294      # a path prefixed by /cygdrive for fixpath to work.
35295      new_path="$CYGWIN_ROOT_PATH$input_path"
35296    fi
35297  fi
35298
35299  # remove trailing .exe if any
35300  new_path="${new_path/%.exe/}"
35301
35302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35303
35304  # First separate the path from the arguments. This will split at the first
35305  # space.
35306  complete="$CXXCPP"
35307  path="${complete%% *}"
35308  tmp="$complete EOL"
35309  arguments="${tmp#* }"
35310
35311  # Input might be given as Windows format, start by converting to
35312  # unix format.
35313  new_path="$path"
35314
35315  windows_path="$new_path"
35316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35317    unix_path=`$CYGPATH -u "$windows_path"`
35318    new_path="$unix_path"
35319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35321    new_path="$unix_path"
35322  fi
35323
35324
35325  # Now try to locate executable using which
35326  new_path=`$WHICH "$new_path" 2> /dev/null`
35327
35328  if test "x$new_path" = x; then
35329    # Oops. Which didn't find the executable.
35330    # The splitting of arguments from the executable at a space might have been incorrect,
35331    # since paths with space are more likely in Windows. Give it another try with the whole
35332    # argument.
35333    path="$complete"
35334    arguments="EOL"
35335    new_path="$path"
35336
35337  windows_path="$new_path"
35338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35339    unix_path=`$CYGPATH -u "$windows_path"`
35340    new_path="$unix_path"
35341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35343    new_path="$unix_path"
35344  fi
35345
35346
35347    new_path=`$WHICH "$new_path" 2> /dev/null`
35348    # bat and cmd files are not always considered executable in MSYS causing which
35349    # to not find them
35350    if test "x$new_path" = x \
35351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35353      new_path="$path"
35354
35355  windows_path="$new_path"
35356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35357    unix_path=`$CYGPATH -u "$windows_path"`
35358    new_path="$unix_path"
35359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35361    new_path="$unix_path"
35362  fi
35363
35364    fi
35365
35366    if test "x$new_path" = x; then
35367      # It's still not found. Now this is an unrecoverable error.
35368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35369$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35370      has_space=`$ECHO "$complete" | $GREP " "`
35371      if test "x$has_space" != x; then
35372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35374      fi
35375      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35376    fi
35377  fi
35378
35379  # Now new_path has a complete unix path to the binary
35380  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35381    # Keep paths in /bin as-is, but remove trailing .exe if any
35382    new_path="${new_path/%.exe/}"
35383    # Do not save /bin paths to all_fixpath_prefixes!
35384  else
35385    # Not in mixed or Windows style, start by that.
35386    new_path=`cmd //c echo $new_path`
35387
35388  input_path="$new_path"
35389  # Check if we need to convert this using DOS-style short mode. If the path
35390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35391  # take no chances and rewrite it.
35392  # Note: m4 eats our [], so we need to use [ and ] instead.
35393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35394  if test "x$has_forbidden_chars" != x; then
35395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35397  fi
35398
35399    # Output is in $new_path
35400
35401  windows_path="$new_path"
35402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35403    unix_path=`$CYGPATH -u "$windows_path"`
35404    new_path="$unix_path"
35405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35407    new_path="$unix_path"
35408  fi
35409
35410    # remove trailing .exe if any
35411    new_path="${new_path/%.exe/}"
35412
35413    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35414    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35415  fi
35416
35417    else
35418      # We're on a unix platform. Hooray! :)
35419      # First separate the path from the arguments. This will split at the first
35420      # space.
35421      complete="$CXXCPP"
35422      path="${complete%% *}"
35423      tmp="$complete EOL"
35424      arguments="${tmp#* }"
35425
35426      # Cannot rely on the command "which" here since it doesn't always work.
35427      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35428      if test -z "$is_absolute_path"; then
35429        # Path to executable is not absolute. Find it.
35430        IFS_save="$IFS"
35431        IFS=:
35432        for p in $PATH; do
35433          if test -f "$p/$path" && test -x "$p/$path"; then
35434            new_path="$p/$path"
35435            break
35436          fi
35437        done
35438        IFS="$IFS_save"
35439      else
35440        # This is an absolute path, we can use it without further modifications.
35441        new_path="$path"
35442      fi
35443
35444      if test "x$new_path" = x; then
35445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35446$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35447        has_space=`$ECHO "$complete" | $GREP " "`
35448        if test "x$has_space" != x; then
35449          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35450$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35451        fi
35452        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35453      fi
35454    fi
35455
35456    # Now join together the path and the arguments once again
35457    if test "x$arguments" != xEOL; then
35458      new_complete="$new_path ${arguments% *}"
35459    else
35460      new_complete="$new_path"
35461    fi
35462
35463    if test "x$complete" != "x$new_complete"; then
35464      CXXCPP="$new_complete"
35465      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35466$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35467    fi
35468  fi
35469
35470
35471  #
35472  # Setup the linker (LD)
35473  #
35474  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35475    # In the Microsoft toolchain we have a separate LD command "link".
35476    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35477    # a cygwin program for something completely different.
35478    # Extract the first word of "link", so it can be a program name with args.
35479set dummy link; ac_word=$2
35480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35481$as_echo_n "checking for $ac_word... " >&6; }
35482if ${ac_cv_prog_LD+:} false; then :
35483  $as_echo_n "(cached) " >&6
35484else
35485  if test -n "$LD"; then
35486  ac_cv_prog_LD="$LD" # Let the user override the test.
35487else
35488  ac_prog_rejected=no
35489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35490for as_dir in $PATH
35491do
35492  IFS=$as_save_IFS
35493  test -z "$as_dir" && as_dir=.
35494    for ac_exec_ext in '' $ac_executable_extensions; do
35495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35496    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35497       ac_prog_rejected=yes
35498       continue
35499     fi
35500    ac_cv_prog_LD="link"
35501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35502    break 2
35503  fi
35504done
35505  done
35506IFS=$as_save_IFS
35507
35508if test $ac_prog_rejected = yes; then
35509  # We found a bogon in the path, so make sure we never use it.
35510  set dummy $ac_cv_prog_LD
35511  shift
35512  if test $# != 0; then
35513    # We chose a different compiler from the bogus one.
35514    # However, it has the same basename, so the bogon will be chosen
35515    # first if we set LD to just the basename; use the full file name.
35516    shift
35517    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35518  fi
35519fi
35520fi
35521fi
35522LD=$ac_cv_prog_LD
35523if test -n "$LD"; then
35524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35525$as_echo "$LD" >&6; }
35526else
35527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35528$as_echo "no" >&6; }
35529fi
35530
35531
35532
35533  # Only process if variable expands to non-empty
35534
35535  if test "x$LD" != x; then
35536    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35537
35538  # First separate the path from the arguments. This will split at the first
35539  # space.
35540  complete="$LD"
35541  path="${complete%% *}"
35542  tmp="$complete EOL"
35543  arguments="${tmp#* }"
35544
35545  # Input might be given as Windows format, start by converting to
35546  # unix format.
35547  new_path=`$CYGPATH -u "$path"`
35548
35549  # Now try to locate executable using which
35550  new_path=`$WHICH "$new_path" 2> /dev/null`
35551  # bat and cmd files are not always considered executable in cygwin causing which
35552  # to not find them
35553  if test "x$new_path" = x \
35554      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35555      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35556    new_path=`$CYGPATH -u "$path"`
35557  fi
35558  if test "x$new_path" = x; then
35559    # Oops. Which didn't find the executable.
35560    # The splitting of arguments from the executable at a space might have been incorrect,
35561    # since paths with space are more likely in Windows. Give it another try with the whole
35562    # argument.
35563    path="$complete"
35564    arguments="EOL"
35565    new_path=`$CYGPATH -u "$path"`
35566    new_path=`$WHICH "$new_path" 2> /dev/null`
35567    # bat and cmd files are not always considered executable in cygwin causing which
35568    # to not find them
35569    if test "x$new_path" = x \
35570        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35571        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35572      new_path=`$CYGPATH -u "$path"`
35573    fi
35574    if test "x$new_path" = x; then
35575      # It's still not found. Now this is an unrecoverable error.
35576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35577$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35578      has_space=`$ECHO "$complete" | $GREP " "`
35579      if test "x$has_space" != x; then
35580        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35581$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35582      fi
35583      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35584    fi
35585  fi
35586
35587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35590  # "foo.exe" is OK but "foo" is an error.
35591  #
35592  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35593  # It is also a way to make sure we got the proper file name for the real test later on.
35594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35595  if test "x$test_shortpath" = x; then
35596    # Short path failed, file does not exist as specified.
35597    # Try adding .exe or .cmd
35598    if test -f "${new_path}.exe"; then
35599      input_to_shortpath="${new_path}.exe"
35600    elif test -f "${new_path}.cmd"; then
35601      input_to_shortpath="${new_path}.cmd"
35602    else
35603      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35604$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35605      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35606$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35607      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35608    fi
35609  else
35610    input_to_shortpath="$new_path"
35611  fi
35612
35613  # Call helper function which possibly converts this using DOS-style short mode.
35614  # If so, the updated path is stored in $new_path.
35615  new_path="$input_to_shortpath"
35616
35617  input_path="$input_to_shortpath"
35618  # Check if we need to convert this using DOS-style short mode. If the path
35619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35620  # take no chances and rewrite it.
35621  # Note: m4 eats our [], so we need to use [ and ] instead.
35622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35623  if test "x$has_forbidden_chars" != x; then
35624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35625    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35626    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35627    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35628      # Going to short mode and back again did indeed matter. Since short mode is
35629      # case insensitive, let's make it lowercase to improve readability.
35630      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35631      # Now convert it back to Unix-style (cygpath)
35632      input_path=`$CYGPATH -u "$shortmode_path"`
35633      new_path="$input_path"
35634    fi
35635  fi
35636
35637  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35638  if test "x$test_cygdrive_prefix" = x; then
35639    # As a simple fix, exclude /usr/bin since it's not a real path.
35640    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35641      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35642      # a path prefixed by /cygdrive for fixpath to work.
35643      new_path="$CYGWIN_ROOT_PATH$input_path"
35644    fi
35645  fi
35646
35647  # remove trailing .exe if any
35648  new_path="${new_path/%.exe/}"
35649
35650    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35651
35652  # First separate the path from the arguments. This will split at the first
35653  # space.
35654  complete="$LD"
35655  path="${complete%% *}"
35656  tmp="$complete EOL"
35657  arguments="${tmp#* }"
35658
35659  # Input might be given as Windows format, start by converting to
35660  # unix format.
35661  new_path="$path"
35662
35663  windows_path="$new_path"
35664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35665    unix_path=`$CYGPATH -u "$windows_path"`
35666    new_path="$unix_path"
35667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35669    new_path="$unix_path"
35670  fi
35671
35672
35673  # Now try to locate executable using which
35674  new_path=`$WHICH "$new_path" 2> /dev/null`
35675
35676  if test "x$new_path" = x; then
35677    # Oops. Which didn't find the executable.
35678    # The splitting of arguments from the executable at a space might have been incorrect,
35679    # since paths with space are more likely in Windows. Give it another try with the whole
35680    # argument.
35681    path="$complete"
35682    arguments="EOL"
35683    new_path="$path"
35684
35685  windows_path="$new_path"
35686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35687    unix_path=`$CYGPATH -u "$windows_path"`
35688    new_path="$unix_path"
35689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35691    new_path="$unix_path"
35692  fi
35693
35694
35695    new_path=`$WHICH "$new_path" 2> /dev/null`
35696    # bat and cmd files are not always considered executable in MSYS causing which
35697    # to not find them
35698    if test "x$new_path" = x \
35699        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35700        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35701      new_path="$path"
35702
35703  windows_path="$new_path"
35704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35705    unix_path=`$CYGPATH -u "$windows_path"`
35706    new_path="$unix_path"
35707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35709    new_path="$unix_path"
35710  fi
35711
35712    fi
35713
35714    if test "x$new_path" = x; then
35715      # It's still not found. Now this is an unrecoverable error.
35716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35717$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35718      has_space=`$ECHO "$complete" | $GREP " "`
35719      if test "x$has_space" != x; then
35720        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35721$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35722      fi
35723      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35724    fi
35725  fi
35726
35727  # Now new_path has a complete unix path to the binary
35728  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35729    # Keep paths in /bin as-is, but remove trailing .exe if any
35730    new_path="${new_path/%.exe/}"
35731    # Do not save /bin paths to all_fixpath_prefixes!
35732  else
35733    # Not in mixed or Windows style, start by that.
35734    new_path=`cmd //c echo $new_path`
35735
35736  input_path="$new_path"
35737  # Check if we need to convert this using DOS-style short mode. If the path
35738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35739  # take no chances and rewrite it.
35740  # Note: m4 eats our [], so we need to use [ and ] instead.
35741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35742  if test "x$has_forbidden_chars" != x; then
35743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35744    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35745  fi
35746
35747    # Output is in $new_path
35748
35749  windows_path="$new_path"
35750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35751    unix_path=`$CYGPATH -u "$windows_path"`
35752    new_path="$unix_path"
35753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35755    new_path="$unix_path"
35756  fi
35757
35758    # remove trailing .exe if any
35759    new_path="${new_path/%.exe/}"
35760
35761    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35762    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35763  fi
35764
35765    else
35766      # We're on a unix platform. Hooray! :)
35767      # First separate the path from the arguments. This will split at the first
35768      # space.
35769      complete="$LD"
35770      path="${complete%% *}"
35771      tmp="$complete EOL"
35772      arguments="${tmp#* }"
35773
35774      # Cannot rely on the command "which" here since it doesn't always work.
35775      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35776      if test -z "$is_absolute_path"; then
35777        # Path to executable is not absolute. Find it.
35778        IFS_save="$IFS"
35779        IFS=:
35780        for p in $PATH; do
35781          if test -f "$p/$path" && test -x "$p/$path"; then
35782            new_path="$p/$path"
35783            break
35784          fi
35785        done
35786        IFS="$IFS_save"
35787      else
35788        # This is an absolute path, we can use it without further modifications.
35789        new_path="$path"
35790      fi
35791
35792      if test "x$new_path" = x; then
35793        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35794$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35795        has_space=`$ECHO "$complete" | $GREP " "`
35796        if test "x$has_space" != x; then
35797          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35798$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35799        fi
35800        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35801      fi
35802    fi
35803
35804    # Now join together the path and the arguments once again
35805    if test "x$arguments" != xEOL; then
35806      new_complete="$new_path ${arguments% *}"
35807    else
35808      new_complete="$new_path"
35809    fi
35810
35811    if test "x$complete" != "x$new_complete"; then
35812      LD="$new_complete"
35813      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35814$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35815    fi
35816  fi
35817
35818    # Verify that we indeed succeeded with this trick.
35819    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35820$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35821    "$LD" --version > /dev/null
35822    if test $? -eq 0 ; then
35823      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35824$as_echo "no" >&6; }
35825      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35826    else
35827      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35828$as_echo "yes" >&6; }
35829    fi
35830    LDCXX="$LD"
35831  else
35832    # All other toolchains use the compiler to link.
35833    LD="$CC"
35834    LDCXX="$CXX"
35835  fi
35836
35837  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35838
35839
35840  #
35841  # Setup the assembler (AS)
35842  #
35843  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35844    # FIXME: should this really be solaris, or solstudio?
35845
35846
35847  # Publish this variable in the help.
35848
35849
35850  if [ -z "${AS+x}" ]; then
35851    # The variable is not set by user, try to locate tool using the code snippet
35852    for ac_prog in as
35853do
35854  # Extract the first word of "$ac_prog", so it can be a program name with args.
35855set dummy $ac_prog; ac_word=$2
35856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35857$as_echo_n "checking for $ac_word... " >&6; }
35858if ${ac_cv_path_AS+:} false; then :
35859  $as_echo_n "(cached) " >&6
35860else
35861  case $AS in
35862  [\\/]* | ?:[\\/]*)
35863  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35864  ;;
35865  *)
35866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35867for as_dir in $PATH
35868do
35869  IFS=$as_save_IFS
35870  test -z "$as_dir" && as_dir=.
35871    for ac_exec_ext in '' $ac_executable_extensions; do
35872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35873    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35875    break 2
35876  fi
35877done
35878  done
35879IFS=$as_save_IFS
35880
35881  ;;
35882esac
35883fi
35884AS=$ac_cv_path_AS
35885if test -n "$AS"; then
35886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35887$as_echo "$AS" >&6; }
35888else
35889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35890$as_echo "no" >&6; }
35891fi
35892
35893
35894  test -n "$AS" && break
35895done
35896
35897  else
35898    # The variable is set, but is it from the command line or the environment?
35899
35900    # Try to remove the string !AS! from our list.
35901    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35902    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35903      # If it failed, the variable was not from the command line. Ignore it,
35904      # but warn the user (except for BASH, which is always set by the calling BASH).
35905      if test "xAS" != xBASH; then
35906        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35907$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35908      fi
35909      # Try to locate tool using the code snippet
35910      for ac_prog in as
35911do
35912  # Extract the first word of "$ac_prog", so it can be a program name with args.
35913set dummy $ac_prog; ac_word=$2
35914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35915$as_echo_n "checking for $ac_word... " >&6; }
35916if ${ac_cv_path_AS+:} false; then :
35917  $as_echo_n "(cached) " >&6
35918else
35919  case $AS in
35920  [\\/]* | ?:[\\/]*)
35921  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35922  ;;
35923  *)
35924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35925for as_dir in $PATH
35926do
35927  IFS=$as_save_IFS
35928  test -z "$as_dir" && as_dir=.
35929    for ac_exec_ext in '' $ac_executable_extensions; do
35930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35931    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35933    break 2
35934  fi
35935done
35936  done
35937IFS=$as_save_IFS
35938
35939  ;;
35940esac
35941fi
35942AS=$ac_cv_path_AS
35943if test -n "$AS"; then
35944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35945$as_echo "$AS" >&6; }
35946else
35947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35948$as_echo "no" >&6; }
35949fi
35950
35951
35952  test -n "$AS" && break
35953done
35954
35955    else
35956      # If it succeeded, then it was overridden by the user. We will use it
35957      # for the tool.
35958
35959      # First remove it from the list of overridden variables, so we can test
35960      # for unknown variables in the end.
35961      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35962
35963      # Check if we try to supply an empty value
35964      if test "x$AS" = x; then
35965        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35966$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35967        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35968$as_echo_n "checking for AS... " >&6; }
35969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35970$as_echo "disabled" >&6; }
35971      else
35972        # Check if the provided tool contains a complete path.
35973        tool_specified="$AS"
35974        tool_basename="${tool_specified##*/}"
35975        if test "x$tool_basename" = "x$tool_specified"; then
35976          # A command without a complete path is provided, search $PATH.
35977          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35978$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35979          # Extract the first word of "$tool_basename", so it can be a program name with args.
35980set dummy $tool_basename; ac_word=$2
35981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35982$as_echo_n "checking for $ac_word... " >&6; }
35983if ${ac_cv_path_AS+:} false; then :
35984  $as_echo_n "(cached) " >&6
35985else
35986  case $AS in
35987  [\\/]* | ?:[\\/]*)
35988  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35989  ;;
35990  *)
35991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35992for as_dir in $PATH
35993do
35994  IFS=$as_save_IFS
35995  test -z "$as_dir" && as_dir=.
35996    for ac_exec_ext in '' $ac_executable_extensions; do
35997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35998    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36000    break 2
36001  fi
36002done
36003  done
36004IFS=$as_save_IFS
36005
36006  ;;
36007esac
36008fi
36009AS=$ac_cv_path_AS
36010if test -n "$AS"; then
36011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36012$as_echo "$AS" >&6; }
36013else
36014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36015$as_echo "no" >&6; }
36016fi
36017
36018
36019          if test "x$AS" = x; then
36020            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36021          fi
36022        else
36023          # Otherwise we believe it is a complete path. Use it as it is.
36024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36025$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36026          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36027$as_echo_n "checking for AS... " >&6; }
36028          if test ! -x "$tool_specified"; then
36029            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36030$as_echo "not found" >&6; }
36031            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36032          fi
36033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36034$as_echo "$tool_specified" >&6; }
36035        fi
36036      fi
36037    fi
36038
36039  fi
36040
36041
36042
36043  # Only process if variable expands to non-empty
36044
36045  if test "x$AS" != x; then
36046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36047
36048  # First separate the path from the arguments. This will split at the first
36049  # space.
36050  complete="$AS"
36051  path="${complete%% *}"
36052  tmp="$complete EOL"
36053  arguments="${tmp#* }"
36054
36055  # Input might be given as Windows format, start by converting to
36056  # unix format.
36057  new_path=`$CYGPATH -u "$path"`
36058
36059  # Now try to locate executable using which
36060  new_path=`$WHICH "$new_path" 2> /dev/null`
36061  # bat and cmd files are not always considered executable in cygwin causing which
36062  # to not find them
36063  if test "x$new_path" = x \
36064      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36065      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36066    new_path=`$CYGPATH -u "$path"`
36067  fi
36068  if test "x$new_path" = x; then
36069    # Oops. Which didn't find the executable.
36070    # The splitting of arguments from the executable at a space might have been incorrect,
36071    # since paths with space are more likely in Windows. Give it another try with the whole
36072    # argument.
36073    path="$complete"
36074    arguments="EOL"
36075    new_path=`$CYGPATH -u "$path"`
36076    new_path=`$WHICH "$new_path" 2> /dev/null`
36077    # bat and cmd files are not always considered executable in cygwin causing which
36078    # to not find them
36079    if test "x$new_path" = x \
36080        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36081        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36082      new_path=`$CYGPATH -u "$path"`
36083    fi
36084    if test "x$new_path" = x; then
36085      # It's still not found. Now this is an unrecoverable error.
36086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36087$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36088      has_space=`$ECHO "$complete" | $GREP " "`
36089      if test "x$has_space" != x; then
36090        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36091$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36092      fi
36093      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36094    fi
36095  fi
36096
36097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36100  # "foo.exe" is OK but "foo" is an error.
36101  #
36102  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36103  # It is also a way to make sure we got the proper file name for the real test later on.
36104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36105  if test "x$test_shortpath" = x; then
36106    # Short path failed, file does not exist as specified.
36107    # Try adding .exe or .cmd
36108    if test -f "${new_path}.exe"; then
36109      input_to_shortpath="${new_path}.exe"
36110    elif test -f "${new_path}.cmd"; then
36111      input_to_shortpath="${new_path}.cmd"
36112    else
36113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36114$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36115      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36116$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36117      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36118    fi
36119  else
36120    input_to_shortpath="$new_path"
36121  fi
36122
36123  # Call helper function which possibly converts this using DOS-style short mode.
36124  # If so, the updated path is stored in $new_path.
36125  new_path="$input_to_shortpath"
36126
36127  input_path="$input_to_shortpath"
36128  # Check if we need to convert this using DOS-style short mode. If the path
36129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36130  # take no chances and rewrite it.
36131  # Note: m4 eats our [], so we need to use [ and ] instead.
36132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36133  if test "x$has_forbidden_chars" != x; then
36134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36138      # Going to short mode and back again did indeed matter. Since short mode is
36139      # case insensitive, let's make it lowercase to improve readability.
36140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36141      # Now convert it back to Unix-style (cygpath)
36142      input_path=`$CYGPATH -u "$shortmode_path"`
36143      new_path="$input_path"
36144    fi
36145  fi
36146
36147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36148  if test "x$test_cygdrive_prefix" = x; then
36149    # As a simple fix, exclude /usr/bin since it's not a real path.
36150    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36152      # a path prefixed by /cygdrive for fixpath to work.
36153      new_path="$CYGWIN_ROOT_PATH$input_path"
36154    fi
36155  fi
36156
36157  # remove trailing .exe if any
36158  new_path="${new_path/%.exe/}"
36159
36160    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36161
36162  # First separate the path from the arguments. This will split at the first
36163  # space.
36164  complete="$AS"
36165  path="${complete%% *}"
36166  tmp="$complete EOL"
36167  arguments="${tmp#* }"
36168
36169  # Input might be given as Windows format, start by converting to
36170  # unix format.
36171  new_path="$path"
36172
36173  windows_path="$new_path"
36174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36175    unix_path=`$CYGPATH -u "$windows_path"`
36176    new_path="$unix_path"
36177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36179    new_path="$unix_path"
36180  fi
36181
36182
36183  # Now try to locate executable using which
36184  new_path=`$WHICH "$new_path" 2> /dev/null`
36185
36186  if test "x$new_path" = x; then
36187    # Oops. Which didn't find the executable.
36188    # The splitting of arguments from the executable at a space might have been incorrect,
36189    # since paths with space are more likely in Windows. Give it another try with the whole
36190    # argument.
36191    path="$complete"
36192    arguments="EOL"
36193    new_path="$path"
36194
36195  windows_path="$new_path"
36196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36197    unix_path=`$CYGPATH -u "$windows_path"`
36198    new_path="$unix_path"
36199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36201    new_path="$unix_path"
36202  fi
36203
36204
36205    new_path=`$WHICH "$new_path" 2> /dev/null`
36206    # bat and cmd files are not always considered executable in MSYS causing which
36207    # to not find them
36208    if test "x$new_path" = x \
36209        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36210        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36211      new_path="$path"
36212
36213  windows_path="$new_path"
36214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36215    unix_path=`$CYGPATH -u "$windows_path"`
36216    new_path="$unix_path"
36217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36219    new_path="$unix_path"
36220  fi
36221
36222    fi
36223
36224    if test "x$new_path" = x; then
36225      # It's still not found. Now this is an unrecoverable error.
36226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36227$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36228      has_space=`$ECHO "$complete" | $GREP " "`
36229      if test "x$has_space" != x; then
36230        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36231$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36232      fi
36233      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36234    fi
36235  fi
36236
36237  # Now new_path has a complete unix path to the binary
36238  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36239    # Keep paths in /bin as-is, but remove trailing .exe if any
36240    new_path="${new_path/%.exe/}"
36241    # Do not save /bin paths to all_fixpath_prefixes!
36242  else
36243    # Not in mixed or Windows style, start by that.
36244    new_path=`cmd //c echo $new_path`
36245
36246  input_path="$new_path"
36247  # Check if we need to convert this using DOS-style short mode. If the path
36248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36249  # take no chances and rewrite it.
36250  # Note: m4 eats our [], so we need to use [ and ] instead.
36251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36252  if test "x$has_forbidden_chars" != x; then
36253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36254    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36255  fi
36256
36257    # Output is in $new_path
36258
36259  windows_path="$new_path"
36260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36261    unix_path=`$CYGPATH -u "$windows_path"`
36262    new_path="$unix_path"
36263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36265    new_path="$unix_path"
36266  fi
36267
36268    # remove trailing .exe if any
36269    new_path="${new_path/%.exe/}"
36270
36271    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36272    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36273  fi
36274
36275    else
36276      # We're on a unix platform. Hooray! :)
36277      # First separate the path from the arguments. This will split at the first
36278      # space.
36279      complete="$AS"
36280      path="${complete%% *}"
36281      tmp="$complete EOL"
36282      arguments="${tmp#* }"
36283
36284      # Cannot rely on the command "which" here since it doesn't always work.
36285      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36286      if test -z "$is_absolute_path"; then
36287        # Path to executable is not absolute. Find it.
36288        IFS_save="$IFS"
36289        IFS=:
36290        for p in $PATH; do
36291          if test -f "$p/$path" && test -x "$p/$path"; then
36292            new_path="$p/$path"
36293            break
36294          fi
36295        done
36296        IFS="$IFS_save"
36297      else
36298        # This is an absolute path, we can use it without further modifications.
36299        new_path="$path"
36300      fi
36301
36302      if test "x$new_path" = x; then
36303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36304$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36305        has_space=`$ECHO "$complete" | $GREP " "`
36306        if test "x$has_space" != x; then
36307          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36308$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36309        fi
36310        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36311      fi
36312    fi
36313
36314    # Now join together the path and the arguments once again
36315    if test "x$arguments" != xEOL; then
36316      new_complete="$new_path ${arguments% *}"
36317    else
36318      new_complete="$new_path"
36319    fi
36320
36321    if test "x$complete" != "x$new_complete"; then
36322      AS="$new_complete"
36323      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36324$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36325    fi
36326  fi
36327
36328  else
36329    # FIXME: is this correct for microsoft?
36330    AS="$CC -c"
36331  fi
36332
36333
36334  #
36335  # Setup the archiver (AR)
36336  #
36337  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36338    # The corresponding ar tool is lib.exe (used to create static libraries)
36339    # Extract the first word of "lib", so it can be a program name with args.
36340set dummy lib; ac_word=$2
36341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36342$as_echo_n "checking for $ac_word... " >&6; }
36343if ${ac_cv_prog_AR+:} false; then :
36344  $as_echo_n "(cached) " >&6
36345else
36346  if test -n "$AR"; then
36347  ac_cv_prog_AR="$AR" # Let the user override the test.
36348else
36349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36350for as_dir in $PATH
36351do
36352  IFS=$as_save_IFS
36353  test -z "$as_dir" && as_dir=.
36354    for ac_exec_ext in '' $ac_executable_extensions; do
36355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36356    ac_cv_prog_AR="lib"
36357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36358    break 2
36359  fi
36360done
36361  done
36362IFS=$as_save_IFS
36363
36364fi
36365fi
36366AR=$ac_cv_prog_AR
36367if test -n "$AR"; then
36368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36369$as_echo "$AR" >&6; }
36370else
36371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36372$as_echo "no" >&6; }
36373fi
36374
36375
36376  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36377
36378
36379  # Publish this variable in the help.
36380
36381
36382  if [ -z "${AR+x}" ]; then
36383    # The variable is not set by user, try to locate tool using the code snippet
36384    if test -n "$ac_tool_prefix"; then
36385  for ac_prog in ar gcc-ar
36386  do
36387    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36388set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36390$as_echo_n "checking for $ac_word... " >&6; }
36391if ${ac_cv_prog_AR+:} false; then :
36392  $as_echo_n "(cached) " >&6
36393else
36394  if test -n "$AR"; then
36395  ac_cv_prog_AR="$AR" # Let the user override the test.
36396else
36397as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36398for as_dir in $PATH
36399do
36400  IFS=$as_save_IFS
36401  test -z "$as_dir" && as_dir=.
36402    for ac_exec_ext in '' $ac_executable_extensions; do
36403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36404    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36406    break 2
36407  fi
36408done
36409  done
36410IFS=$as_save_IFS
36411
36412fi
36413fi
36414AR=$ac_cv_prog_AR
36415if test -n "$AR"; then
36416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36417$as_echo "$AR" >&6; }
36418else
36419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36420$as_echo "no" >&6; }
36421fi
36422
36423
36424    test -n "$AR" && break
36425  done
36426fi
36427if test -z "$AR"; then
36428  ac_ct_AR=$AR
36429  for ac_prog in ar gcc-ar
36430do
36431  # Extract the first word of "$ac_prog", so it can be a program name with args.
36432set dummy $ac_prog; ac_word=$2
36433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36434$as_echo_n "checking for $ac_word... " >&6; }
36435if ${ac_cv_prog_ac_ct_AR+:} false; then :
36436  $as_echo_n "(cached) " >&6
36437else
36438  if test -n "$ac_ct_AR"; then
36439  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36440else
36441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36442for as_dir in $PATH
36443do
36444  IFS=$as_save_IFS
36445  test -z "$as_dir" && as_dir=.
36446    for ac_exec_ext in '' $ac_executable_extensions; do
36447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36448    ac_cv_prog_ac_ct_AR="$ac_prog"
36449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36450    break 2
36451  fi
36452done
36453  done
36454IFS=$as_save_IFS
36455
36456fi
36457fi
36458ac_ct_AR=$ac_cv_prog_ac_ct_AR
36459if test -n "$ac_ct_AR"; then
36460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36461$as_echo "$ac_ct_AR" >&6; }
36462else
36463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36464$as_echo "no" >&6; }
36465fi
36466
36467
36468  test -n "$ac_ct_AR" && break
36469done
36470
36471  if test "x$ac_ct_AR" = x; then
36472    AR=""
36473  else
36474    case $cross_compiling:$ac_tool_warned in
36475yes:)
36476{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36477$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36478ac_tool_warned=yes ;;
36479esac
36480    AR=$ac_ct_AR
36481  fi
36482fi
36483
36484  else
36485    # The variable is set, but is it from the command line or the environment?
36486
36487    # Try to remove the string !AR! from our list.
36488    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36489    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36490      # If it failed, the variable was not from the command line. Ignore it,
36491      # but warn the user (except for BASH, which is always set by the calling BASH).
36492      if test "xAR" != xBASH; then
36493        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36494$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36495      fi
36496      # Try to locate tool using the code snippet
36497      if test -n "$ac_tool_prefix"; then
36498  for ac_prog in ar gcc-ar
36499  do
36500    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36501set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36503$as_echo_n "checking for $ac_word... " >&6; }
36504if ${ac_cv_prog_AR+:} false; then :
36505  $as_echo_n "(cached) " >&6
36506else
36507  if test -n "$AR"; then
36508  ac_cv_prog_AR="$AR" # Let the user override the test.
36509else
36510as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36511for as_dir in $PATH
36512do
36513  IFS=$as_save_IFS
36514  test -z "$as_dir" && as_dir=.
36515    for ac_exec_ext in '' $ac_executable_extensions; do
36516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36517    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36519    break 2
36520  fi
36521done
36522  done
36523IFS=$as_save_IFS
36524
36525fi
36526fi
36527AR=$ac_cv_prog_AR
36528if test -n "$AR"; then
36529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36530$as_echo "$AR" >&6; }
36531else
36532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36533$as_echo "no" >&6; }
36534fi
36535
36536
36537    test -n "$AR" && break
36538  done
36539fi
36540if test -z "$AR"; then
36541  ac_ct_AR=$AR
36542  for ac_prog in ar gcc-ar
36543do
36544  # Extract the first word of "$ac_prog", so it can be a program name with args.
36545set dummy $ac_prog; ac_word=$2
36546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36547$as_echo_n "checking for $ac_word... " >&6; }
36548if ${ac_cv_prog_ac_ct_AR+:} false; then :
36549  $as_echo_n "(cached) " >&6
36550else
36551  if test -n "$ac_ct_AR"; then
36552  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36553else
36554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36555for as_dir in $PATH
36556do
36557  IFS=$as_save_IFS
36558  test -z "$as_dir" && as_dir=.
36559    for ac_exec_ext in '' $ac_executable_extensions; do
36560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36561    ac_cv_prog_ac_ct_AR="$ac_prog"
36562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36563    break 2
36564  fi
36565done
36566  done
36567IFS=$as_save_IFS
36568
36569fi
36570fi
36571ac_ct_AR=$ac_cv_prog_ac_ct_AR
36572if test -n "$ac_ct_AR"; then
36573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36574$as_echo "$ac_ct_AR" >&6; }
36575else
36576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36577$as_echo "no" >&6; }
36578fi
36579
36580
36581  test -n "$ac_ct_AR" && break
36582done
36583
36584  if test "x$ac_ct_AR" = x; then
36585    AR=""
36586  else
36587    case $cross_compiling:$ac_tool_warned in
36588yes:)
36589{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36590$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36591ac_tool_warned=yes ;;
36592esac
36593    AR=$ac_ct_AR
36594  fi
36595fi
36596
36597    else
36598      # If it succeeded, then it was overridden by the user. We will use it
36599      # for the tool.
36600
36601      # First remove it from the list of overridden variables, so we can test
36602      # for unknown variables in the end.
36603      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36604
36605      # Check if we try to supply an empty value
36606      if test "x$AR" = x; then
36607        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36608$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36609        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36610$as_echo_n "checking for AR... " >&6; }
36611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36612$as_echo "disabled" >&6; }
36613      else
36614        # Check if the provided tool contains a complete path.
36615        tool_specified="$AR"
36616        tool_basename="${tool_specified##*/}"
36617        if test "x$tool_basename" = "x$tool_specified"; then
36618          # A command without a complete path is provided, search $PATH.
36619          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36620$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36621          # Extract the first word of "$tool_basename", so it can be a program name with args.
36622set dummy $tool_basename; ac_word=$2
36623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36624$as_echo_n "checking for $ac_word... " >&6; }
36625if ${ac_cv_path_AR+:} false; then :
36626  $as_echo_n "(cached) " >&6
36627else
36628  case $AR in
36629  [\\/]* | ?:[\\/]*)
36630  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36631  ;;
36632  *)
36633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36634for as_dir in $PATH
36635do
36636  IFS=$as_save_IFS
36637  test -z "$as_dir" && as_dir=.
36638    for ac_exec_ext in '' $ac_executable_extensions; do
36639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36640    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36642    break 2
36643  fi
36644done
36645  done
36646IFS=$as_save_IFS
36647
36648  ;;
36649esac
36650fi
36651AR=$ac_cv_path_AR
36652if test -n "$AR"; then
36653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36654$as_echo "$AR" >&6; }
36655else
36656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36657$as_echo "no" >&6; }
36658fi
36659
36660
36661          if test "x$AR" = x; then
36662            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36663          fi
36664        else
36665          # Otherwise we believe it is a complete path. Use it as it is.
36666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36667$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36668          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36669$as_echo_n "checking for AR... " >&6; }
36670          if test ! -x "$tool_specified"; then
36671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36672$as_echo "not found" >&6; }
36673            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36674          fi
36675          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36676$as_echo "$tool_specified" >&6; }
36677        fi
36678      fi
36679    fi
36680
36681  fi
36682
36683
36684  else
36685
36686
36687  # Publish this variable in the help.
36688
36689
36690  if [ -z "${AR+x}" ]; then
36691    # The variable is not set by user, try to locate tool using the code snippet
36692    if test -n "$ac_tool_prefix"; then
36693  for ac_prog in ar
36694  do
36695    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36696set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36698$as_echo_n "checking for $ac_word... " >&6; }
36699if ${ac_cv_prog_AR+:} false; then :
36700  $as_echo_n "(cached) " >&6
36701else
36702  if test -n "$AR"; then
36703  ac_cv_prog_AR="$AR" # Let the user override the test.
36704else
36705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36706for as_dir in $PATH
36707do
36708  IFS=$as_save_IFS
36709  test -z "$as_dir" && as_dir=.
36710    for ac_exec_ext in '' $ac_executable_extensions; do
36711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36712    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36714    break 2
36715  fi
36716done
36717  done
36718IFS=$as_save_IFS
36719
36720fi
36721fi
36722AR=$ac_cv_prog_AR
36723if test -n "$AR"; then
36724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36725$as_echo "$AR" >&6; }
36726else
36727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36728$as_echo "no" >&6; }
36729fi
36730
36731
36732    test -n "$AR" && break
36733  done
36734fi
36735if test -z "$AR"; then
36736  ac_ct_AR=$AR
36737  for ac_prog in ar
36738do
36739  # Extract the first word of "$ac_prog", so it can be a program name with args.
36740set dummy $ac_prog; ac_word=$2
36741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36742$as_echo_n "checking for $ac_word... " >&6; }
36743if ${ac_cv_prog_ac_ct_AR+:} false; then :
36744  $as_echo_n "(cached) " >&6
36745else
36746  if test -n "$ac_ct_AR"; then
36747  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36748else
36749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36750for as_dir in $PATH
36751do
36752  IFS=$as_save_IFS
36753  test -z "$as_dir" && as_dir=.
36754    for ac_exec_ext in '' $ac_executable_extensions; do
36755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36756    ac_cv_prog_ac_ct_AR="$ac_prog"
36757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36758    break 2
36759  fi
36760done
36761  done
36762IFS=$as_save_IFS
36763
36764fi
36765fi
36766ac_ct_AR=$ac_cv_prog_ac_ct_AR
36767if test -n "$ac_ct_AR"; then
36768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36769$as_echo "$ac_ct_AR" >&6; }
36770else
36771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36772$as_echo "no" >&6; }
36773fi
36774
36775
36776  test -n "$ac_ct_AR" && break
36777done
36778
36779  if test "x$ac_ct_AR" = x; then
36780    AR=""
36781  else
36782    case $cross_compiling:$ac_tool_warned in
36783yes:)
36784{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36785$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36786ac_tool_warned=yes ;;
36787esac
36788    AR=$ac_ct_AR
36789  fi
36790fi
36791
36792  else
36793    # The variable is set, but is it from the command line or the environment?
36794
36795    # Try to remove the string !AR! from our list.
36796    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36797    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36798      # If it failed, the variable was not from the command line. Ignore it,
36799      # but warn the user (except for BASH, which is always set by the calling BASH).
36800      if test "xAR" != xBASH; then
36801        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36802$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36803      fi
36804      # Try to locate tool using the code snippet
36805      if test -n "$ac_tool_prefix"; then
36806  for ac_prog in ar
36807  do
36808    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36809set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36811$as_echo_n "checking for $ac_word... " >&6; }
36812if ${ac_cv_prog_AR+:} false; then :
36813  $as_echo_n "(cached) " >&6
36814else
36815  if test -n "$AR"; then
36816  ac_cv_prog_AR="$AR" # Let the user override the test.
36817else
36818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36819for as_dir in $PATH
36820do
36821  IFS=$as_save_IFS
36822  test -z "$as_dir" && as_dir=.
36823    for ac_exec_ext in '' $ac_executable_extensions; do
36824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36825    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36827    break 2
36828  fi
36829done
36830  done
36831IFS=$as_save_IFS
36832
36833fi
36834fi
36835AR=$ac_cv_prog_AR
36836if test -n "$AR"; then
36837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36838$as_echo "$AR" >&6; }
36839else
36840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36841$as_echo "no" >&6; }
36842fi
36843
36844
36845    test -n "$AR" && break
36846  done
36847fi
36848if test -z "$AR"; then
36849  ac_ct_AR=$AR
36850  for ac_prog in ar
36851do
36852  # Extract the first word of "$ac_prog", so it can be a program name with args.
36853set dummy $ac_prog; ac_word=$2
36854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36855$as_echo_n "checking for $ac_word... " >&6; }
36856if ${ac_cv_prog_ac_ct_AR+:} false; then :
36857  $as_echo_n "(cached) " >&6
36858else
36859  if test -n "$ac_ct_AR"; then
36860  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36861else
36862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36863for as_dir in $PATH
36864do
36865  IFS=$as_save_IFS
36866  test -z "$as_dir" && as_dir=.
36867    for ac_exec_ext in '' $ac_executable_extensions; do
36868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36869    ac_cv_prog_ac_ct_AR="$ac_prog"
36870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36871    break 2
36872  fi
36873done
36874  done
36875IFS=$as_save_IFS
36876
36877fi
36878fi
36879ac_ct_AR=$ac_cv_prog_ac_ct_AR
36880if test -n "$ac_ct_AR"; then
36881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36882$as_echo "$ac_ct_AR" >&6; }
36883else
36884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36885$as_echo "no" >&6; }
36886fi
36887
36888
36889  test -n "$ac_ct_AR" && break
36890done
36891
36892  if test "x$ac_ct_AR" = x; then
36893    AR=""
36894  else
36895    case $cross_compiling:$ac_tool_warned in
36896yes:)
36897{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36898$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36899ac_tool_warned=yes ;;
36900esac
36901    AR=$ac_ct_AR
36902  fi
36903fi
36904
36905    else
36906      # If it succeeded, then it was overridden by the user. We will use it
36907      # for the tool.
36908
36909      # First remove it from the list of overridden variables, so we can test
36910      # for unknown variables in the end.
36911      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36912
36913      # Check if we try to supply an empty value
36914      if test "x$AR" = x; then
36915        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36916$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36917        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36918$as_echo_n "checking for AR... " >&6; }
36919        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36920$as_echo "disabled" >&6; }
36921      else
36922        # Check if the provided tool contains a complete path.
36923        tool_specified="$AR"
36924        tool_basename="${tool_specified##*/}"
36925        if test "x$tool_basename" = "x$tool_specified"; then
36926          # A command without a complete path is provided, search $PATH.
36927          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36928$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36929          # Extract the first word of "$tool_basename", so it can be a program name with args.
36930set dummy $tool_basename; ac_word=$2
36931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36932$as_echo_n "checking for $ac_word... " >&6; }
36933if ${ac_cv_path_AR+:} false; then :
36934  $as_echo_n "(cached) " >&6
36935else
36936  case $AR in
36937  [\\/]* | ?:[\\/]*)
36938  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36939  ;;
36940  *)
36941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36942for as_dir in $PATH
36943do
36944  IFS=$as_save_IFS
36945  test -z "$as_dir" && as_dir=.
36946    for ac_exec_ext in '' $ac_executable_extensions; do
36947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36948    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36950    break 2
36951  fi
36952done
36953  done
36954IFS=$as_save_IFS
36955
36956  ;;
36957esac
36958fi
36959AR=$ac_cv_path_AR
36960if test -n "$AR"; then
36961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36962$as_echo "$AR" >&6; }
36963else
36964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36965$as_echo "no" >&6; }
36966fi
36967
36968
36969          if test "x$AR" = x; then
36970            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36971          fi
36972        else
36973          # Otherwise we believe it is a complete path. Use it as it is.
36974          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36975$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36976          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36977$as_echo_n "checking for AR... " >&6; }
36978          if test ! -x "$tool_specified"; then
36979            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36980$as_echo "not found" >&6; }
36981            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36982          fi
36983          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36984$as_echo "$tool_specified" >&6; }
36985        fi
36986      fi
36987    fi
36988
36989  fi
36990
36991
36992  fi
36993
36994  # Only process if variable expands to non-empty
36995
36996  if test "x$AR" != x; then
36997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36998
36999  # First separate the path from the arguments. This will split at the first
37000  # space.
37001  complete="$AR"
37002  path="${complete%% *}"
37003  tmp="$complete EOL"
37004  arguments="${tmp#* }"
37005
37006  # Input might be given as Windows format, start by converting to
37007  # unix format.
37008  new_path=`$CYGPATH -u "$path"`
37009
37010  # Now try to locate executable using which
37011  new_path=`$WHICH "$new_path" 2> /dev/null`
37012  # bat and cmd files are not always considered executable in cygwin causing which
37013  # to not find them
37014  if test "x$new_path" = x \
37015      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37016      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37017    new_path=`$CYGPATH -u "$path"`
37018  fi
37019  if test "x$new_path" = x; then
37020    # Oops. Which didn't find the executable.
37021    # The splitting of arguments from the executable at a space might have been incorrect,
37022    # since paths with space are more likely in Windows. Give it another try with the whole
37023    # argument.
37024    path="$complete"
37025    arguments="EOL"
37026    new_path=`$CYGPATH -u "$path"`
37027    new_path=`$WHICH "$new_path" 2> /dev/null`
37028    # bat and cmd files are not always considered executable in cygwin causing which
37029    # to not find them
37030    if test "x$new_path" = x \
37031        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37032        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37033      new_path=`$CYGPATH -u "$path"`
37034    fi
37035    if test "x$new_path" = x; then
37036      # It's still not found. Now this is an unrecoverable error.
37037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37038$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37039      has_space=`$ECHO "$complete" | $GREP " "`
37040      if test "x$has_space" != x; then
37041        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37042$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37043      fi
37044      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37045    fi
37046  fi
37047
37048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37051  # "foo.exe" is OK but "foo" is an error.
37052  #
37053  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37054  # It is also a way to make sure we got the proper file name for the real test later on.
37055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37056  if test "x$test_shortpath" = x; then
37057    # Short path failed, file does not exist as specified.
37058    # Try adding .exe or .cmd
37059    if test -f "${new_path}.exe"; then
37060      input_to_shortpath="${new_path}.exe"
37061    elif test -f "${new_path}.cmd"; then
37062      input_to_shortpath="${new_path}.cmd"
37063    else
37064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37065$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37066      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37067$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37068      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37069    fi
37070  else
37071    input_to_shortpath="$new_path"
37072  fi
37073
37074  # Call helper function which possibly converts this using DOS-style short mode.
37075  # If so, the updated path is stored in $new_path.
37076  new_path="$input_to_shortpath"
37077
37078  input_path="$input_to_shortpath"
37079  # Check if we need to convert this using DOS-style short mode. If the path
37080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37081  # take no chances and rewrite it.
37082  # Note: m4 eats our [], so we need to use [ and ] instead.
37083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37084  if test "x$has_forbidden_chars" != x; then
37085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37089      # Going to short mode and back again did indeed matter. Since short mode is
37090      # case insensitive, let's make it lowercase to improve readability.
37091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37092      # Now convert it back to Unix-style (cygpath)
37093      input_path=`$CYGPATH -u "$shortmode_path"`
37094      new_path="$input_path"
37095    fi
37096  fi
37097
37098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37099  if test "x$test_cygdrive_prefix" = x; then
37100    # As a simple fix, exclude /usr/bin since it's not a real path.
37101    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37103      # a path prefixed by /cygdrive for fixpath to work.
37104      new_path="$CYGWIN_ROOT_PATH$input_path"
37105    fi
37106  fi
37107
37108  # remove trailing .exe if any
37109  new_path="${new_path/%.exe/}"
37110
37111    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37112
37113  # First separate the path from the arguments. This will split at the first
37114  # space.
37115  complete="$AR"
37116  path="${complete%% *}"
37117  tmp="$complete EOL"
37118  arguments="${tmp#* }"
37119
37120  # Input might be given as Windows format, start by converting to
37121  # unix format.
37122  new_path="$path"
37123
37124  windows_path="$new_path"
37125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37126    unix_path=`$CYGPATH -u "$windows_path"`
37127    new_path="$unix_path"
37128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37130    new_path="$unix_path"
37131  fi
37132
37133
37134  # Now try to locate executable using which
37135  new_path=`$WHICH "$new_path" 2> /dev/null`
37136
37137  if test "x$new_path" = x; then
37138    # Oops. Which didn't find the executable.
37139    # The splitting of arguments from the executable at a space might have been incorrect,
37140    # since paths with space are more likely in Windows. Give it another try with the whole
37141    # argument.
37142    path="$complete"
37143    arguments="EOL"
37144    new_path="$path"
37145
37146  windows_path="$new_path"
37147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37148    unix_path=`$CYGPATH -u "$windows_path"`
37149    new_path="$unix_path"
37150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37152    new_path="$unix_path"
37153  fi
37154
37155
37156    new_path=`$WHICH "$new_path" 2> /dev/null`
37157    # bat and cmd files are not always considered executable in MSYS causing which
37158    # to not find them
37159    if test "x$new_path" = x \
37160        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37161        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37162      new_path="$path"
37163
37164  windows_path="$new_path"
37165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37166    unix_path=`$CYGPATH -u "$windows_path"`
37167    new_path="$unix_path"
37168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37170    new_path="$unix_path"
37171  fi
37172
37173    fi
37174
37175    if test "x$new_path" = x; then
37176      # It's still not found. Now this is an unrecoverable error.
37177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37178$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37179      has_space=`$ECHO "$complete" | $GREP " "`
37180      if test "x$has_space" != x; then
37181        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37182$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37183      fi
37184      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37185    fi
37186  fi
37187
37188  # Now new_path has a complete unix path to the binary
37189  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37190    # Keep paths in /bin as-is, but remove trailing .exe if any
37191    new_path="${new_path/%.exe/}"
37192    # Do not save /bin paths to all_fixpath_prefixes!
37193  else
37194    # Not in mixed or Windows style, start by that.
37195    new_path=`cmd //c echo $new_path`
37196
37197  input_path="$new_path"
37198  # Check if we need to convert this using DOS-style short mode. If the path
37199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37200  # take no chances and rewrite it.
37201  # Note: m4 eats our [], so we need to use [ and ] instead.
37202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37203  if test "x$has_forbidden_chars" != x; then
37204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37205    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37206  fi
37207
37208    # Output is in $new_path
37209
37210  windows_path="$new_path"
37211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37212    unix_path=`$CYGPATH -u "$windows_path"`
37213    new_path="$unix_path"
37214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37216    new_path="$unix_path"
37217  fi
37218
37219    # remove trailing .exe if any
37220    new_path="${new_path/%.exe/}"
37221
37222    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37223    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37224  fi
37225
37226    else
37227      # We're on a unix platform. Hooray! :)
37228      # First separate the path from the arguments. This will split at the first
37229      # space.
37230      complete="$AR"
37231      path="${complete%% *}"
37232      tmp="$complete EOL"
37233      arguments="${tmp#* }"
37234
37235      # Cannot rely on the command "which" here since it doesn't always work.
37236      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37237      if test -z "$is_absolute_path"; then
37238        # Path to executable is not absolute. Find it.
37239        IFS_save="$IFS"
37240        IFS=:
37241        for p in $PATH; do
37242          if test -f "$p/$path" && test -x "$p/$path"; then
37243            new_path="$p/$path"
37244            break
37245          fi
37246        done
37247        IFS="$IFS_save"
37248      else
37249        # This is an absolute path, we can use it without further modifications.
37250        new_path="$path"
37251      fi
37252
37253      if test "x$new_path" = x; then
37254        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37255$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37256        has_space=`$ECHO "$complete" | $GREP " "`
37257        if test "x$has_space" != x; then
37258          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37259$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37260        fi
37261        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37262      fi
37263    fi
37264
37265    # Now join together the path and the arguments once again
37266    if test "x$arguments" != xEOL; then
37267      new_complete="$new_path ${arguments% *}"
37268    else
37269      new_complete="$new_path"
37270    fi
37271
37272    if test "x$complete" != "x$new_complete"; then
37273      AR="$new_complete"
37274      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37275$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37276    fi
37277  fi
37278
37279
37280
37281  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37282
37283
37284  # Publish this variable in the help.
37285
37286
37287  if [ -z "${LIPO+x}" ]; then
37288    # The variable is not set by user, try to locate tool using the code snippet
37289    for ac_prog in lipo
37290do
37291  # Extract the first word of "$ac_prog", so it can be a program name with args.
37292set dummy $ac_prog; ac_word=$2
37293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37294$as_echo_n "checking for $ac_word... " >&6; }
37295if ${ac_cv_path_LIPO+:} false; then :
37296  $as_echo_n "(cached) " >&6
37297else
37298  case $LIPO in
37299  [\\/]* | ?:[\\/]*)
37300  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37301  ;;
37302  *)
37303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37304for as_dir in $PATH
37305do
37306  IFS=$as_save_IFS
37307  test -z "$as_dir" && as_dir=.
37308    for ac_exec_ext in '' $ac_executable_extensions; do
37309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37310    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37312    break 2
37313  fi
37314done
37315  done
37316IFS=$as_save_IFS
37317
37318  ;;
37319esac
37320fi
37321LIPO=$ac_cv_path_LIPO
37322if test -n "$LIPO"; then
37323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37324$as_echo "$LIPO" >&6; }
37325else
37326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37327$as_echo "no" >&6; }
37328fi
37329
37330
37331  test -n "$LIPO" && break
37332done
37333
37334  else
37335    # The variable is set, but is it from the command line or the environment?
37336
37337    # Try to remove the string !LIPO! from our list.
37338    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37339    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37340      # If it failed, the variable was not from the command line. Ignore it,
37341      # but warn the user (except for BASH, which is always set by the calling BASH).
37342      if test "xLIPO" != xBASH; then
37343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37344$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37345      fi
37346      # Try to locate tool using the code snippet
37347      for ac_prog in lipo
37348do
37349  # Extract the first word of "$ac_prog", so it can be a program name with args.
37350set dummy $ac_prog; ac_word=$2
37351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37352$as_echo_n "checking for $ac_word... " >&6; }
37353if ${ac_cv_path_LIPO+:} false; then :
37354  $as_echo_n "(cached) " >&6
37355else
37356  case $LIPO in
37357  [\\/]* | ?:[\\/]*)
37358  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37359  ;;
37360  *)
37361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37362for as_dir in $PATH
37363do
37364  IFS=$as_save_IFS
37365  test -z "$as_dir" && as_dir=.
37366    for ac_exec_ext in '' $ac_executable_extensions; do
37367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37368    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37370    break 2
37371  fi
37372done
37373  done
37374IFS=$as_save_IFS
37375
37376  ;;
37377esac
37378fi
37379LIPO=$ac_cv_path_LIPO
37380if test -n "$LIPO"; then
37381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37382$as_echo "$LIPO" >&6; }
37383else
37384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37385$as_echo "no" >&6; }
37386fi
37387
37388
37389  test -n "$LIPO" && break
37390done
37391
37392    else
37393      # If it succeeded, then it was overridden by the user. We will use it
37394      # for the tool.
37395
37396      # First remove it from the list of overridden variables, so we can test
37397      # for unknown variables in the end.
37398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37399
37400      # Check if we try to supply an empty value
37401      if test "x$LIPO" = x; then
37402        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37403$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37405$as_echo_n "checking for LIPO... " >&6; }
37406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37407$as_echo "disabled" >&6; }
37408      else
37409        # Check if the provided tool contains a complete path.
37410        tool_specified="$LIPO"
37411        tool_basename="${tool_specified##*/}"
37412        if test "x$tool_basename" = "x$tool_specified"; then
37413          # A command without a complete path is provided, search $PATH.
37414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37415$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37416          # Extract the first word of "$tool_basename", so it can be a program name with args.
37417set dummy $tool_basename; ac_word=$2
37418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37419$as_echo_n "checking for $ac_word... " >&6; }
37420if ${ac_cv_path_LIPO+:} false; then :
37421  $as_echo_n "(cached) " >&6
37422else
37423  case $LIPO in
37424  [\\/]* | ?:[\\/]*)
37425  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37426  ;;
37427  *)
37428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37429for as_dir in $PATH
37430do
37431  IFS=$as_save_IFS
37432  test -z "$as_dir" && as_dir=.
37433    for ac_exec_ext in '' $ac_executable_extensions; do
37434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37435    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37437    break 2
37438  fi
37439done
37440  done
37441IFS=$as_save_IFS
37442
37443  ;;
37444esac
37445fi
37446LIPO=$ac_cv_path_LIPO
37447if test -n "$LIPO"; then
37448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37449$as_echo "$LIPO" >&6; }
37450else
37451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37452$as_echo "no" >&6; }
37453fi
37454
37455
37456          if test "x$LIPO" = x; then
37457            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37458          fi
37459        else
37460          # Otherwise we believe it is a complete path. Use it as it is.
37461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37462$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37463          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37464$as_echo_n "checking for LIPO... " >&6; }
37465          if test ! -x "$tool_specified"; then
37466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37467$as_echo "not found" >&6; }
37468            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37469          fi
37470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37471$as_echo "$tool_specified" >&6; }
37472        fi
37473      fi
37474    fi
37475
37476  fi
37477
37478
37479
37480  # Only process if variable expands to non-empty
37481
37482  if test "x$LIPO" != x; then
37483    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37484
37485  # First separate the path from the arguments. This will split at the first
37486  # space.
37487  complete="$LIPO"
37488  path="${complete%% *}"
37489  tmp="$complete EOL"
37490  arguments="${tmp#* }"
37491
37492  # Input might be given as Windows format, start by converting to
37493  # unix format.
37494  new_path=`$CYGPATH -u "$path"`
37495
37496  # Now try to locate executable using which
37497  new_path=`$WHICH "$new_path" 2> /dev/null`
37498  # bat and cmd files are not always considered executable in cygwin causing which
37499  # to not find them
37500  if test "x$new_path" = x \
37501      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37502      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37503    new_path=`$CYGPATH -u "$path"`
37504  fi
37505  if test "x$new_path" = x; then
37506    # Oops. Which didn't find the executable.
37507    # The splitting of arguments from the executable at a space might have been incorrect,
37508    # since paths with space are more likely in Windows. Give it another try with the whole
37509    # argument.
37510    path="$complete"
37511    arguments="EOL"
37512    new_path=`$CYGPATH -u "$path"`
37513    new_path=`$WHICH "$new_path" 2> /dev/null`
37514    # bat and cmd files are not always considered executable in cygwin causing which
37515    # to not find them
37516    if test "x$new_path" = x \
37517        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37518        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37519      new_path=`$CYGPATH -u "$path"`
37520    fi
37521    if test "x$new_path" = x; then
37522      # It's still not found. Now this is an unrecoverable error.
37523      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37524$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37525      has_space=`$ECHO "$complete" | $GREP " "`
37526      if test "x$has_space" != x; then
37527        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37528$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37529      fi
37530      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37531    fi
37532  fi
37533
37534  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37535  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37536  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37537  # "foo.exe" is OK but "foo" is an error.
37538  #
37539  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37540  # It is also a way to make sure we got the proper file name for the real test later on.
37541  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37542  if test "x$test_shortpath" = x; then
37543    # Short path failed, file does not exist as specified.
37544    # Try adding .exe or .cmd
37545    if test -f "${new_path}.exe"; then
37546      input_to_shortpath="${new_path}.exe"
37547    elif test -f "${new_path}.cmd"; then
37548      input_to_shortpath="${new_path}.cmd"
37549    else
37550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37551$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37552      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37553$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37554      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37555    fi
37556  else
37557    input_to_shortpath="$new_path"
37558  fi
37559
37560  # Call helper function which possibly converts this using DOS-style short mode.
37561  # If so, the updated path is stored in $new_path.
37562  new_path="$input_to_shortpath"
37563
37564  input_path="$input_to_shortpath"
37565  # Check if we need to convert this using DOS-style short mode. If the path
37566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37567  # take no chances and rewrite it.
37568  # Note: m4 eats our [], so we need to use [ and ] instead.
37569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37570  if test "x$has_forbidden_chars" != x; then
37571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37572    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37573    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37574    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37575      # Going to short mode and back again did indeed matter. Since short mode is
37576      # case insensitive, let's make it lowercase to improve readability.
37577      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37578      # Now convert it back to Unix-style (cygpath)
37579      input_path=`$CYGPATH -u "$shortmode_path"`
37580      new_path="$input_path"
37581    fi
37582  fi
37583
37584  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37585  if test "x$test_cygdrive_prefix" = x; then
37586    # As a simple fix, exclude /usr/bin since it's not a real path.
37587    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37588      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37589      # a path prefixed by /cygdrive for fixpath to work.
37590      new_path="$CYGWIN_ROOT_PATH$input_path"
37591    fi
37592  fi
37593
37594  # remove trailing .exe if any
37595  new_path="${new_path/%.exe/}"
37596
37597    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37598
37599  # First separate the path from the arguments. This will split at the first
37600  # space.
37601  complete="$LIPO"
37602  path="${complete%% *}"
37603  tmp="$complete EOL"
37604  arguments="${tmp#* }"
37605
37606  # Input might be given as Windows format, start by converting to
37607  # unix format.
37608  new_path="$path"
37609
37610  windows_path="$new_path"
37611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37612    unix_path=`$CYGPATH -u "$windows_path"`
37613    new_path="$unix_path"
37614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37616    new_path="$unix_path"
37617  fi
37618
37619
37620  # Now try to locate executable using which
37621  new_path=`$WHICH "$new_path" 2> /dev/null`
37622
37623  if test "x$new_path" = x; then
37624    # Oops. Which didn't find the executable.
37625    # The splitting of arguments from the executable at a space might have been incorrect,
37626    # since paths with space are more likely in Windows. Give it another try with the whole
37627    # argument.
37628    path="$complete"
37629    arguments="EOL"
37630    new_path="$path"
37631
37632  windows_path="$new_path"
37633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37634    unix_path=`$CYGPATH -u "$windows_path"`
37635    new_path="$unix_path"
37636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37638    new_path="$unix_path"
37639  fi
37640
37641
37642    new_path=`$WHICH "$new_path" 2> /dev/null`
37643    # bat and cmd files are not always considered executable in MSYS causing which
37644    # to not find them
37645    if test "x$new_path" = x \
37646        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37647        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37648      new_path="$path"
37649
37650  windows_path="$new_path"
37651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37652    unix_path=`$CYGPATH -u "$windows_path"`
37653    new_path="$unix_path"
37654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37656    new_path="$unix_path"
37657  fi
37658
37659    fi
37660
37661    if test "x$new_path" = x; then
37662      # It's still not found. Now this is an unrecoverable error.
37663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37664$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37665      has_space=`$ECHO "$complete" | $GREP " "`
37666      if test "x$has_space" != x; then
37667        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37668$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37669      fi
37670      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37671    fi
37672  fi
37673
37674  # Now new_path has a complete unix path to the binary
37675  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37676    # Keep paths in /bin as-is, but remove trailing .exe if any
37677    new_path="${new_path/%.exe/}"
37678    # Do not save /bin paths to all_fixpath_prefixes!
37679  else
37680    # Not in mixed or Windows style, start by that.
37681    new_path=`cmd //c echo $new_path`
37682
37683  input_path="$new_path"
37684  # Check if we need to convert this using DOS-style short mode. If the path
37685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37686  # take no chances and rewrite it.
37687  # Note: m4 eats our [], so we need to use [ and ] instead.
37688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37689  if test "x$has_forbidden_chars" != x; then
37690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37691    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37692  fi
37693
37694    # Output is in $new_path
37695
37696  windows_path="$new_path"
37697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37698    unix_path=`$CYGPATH -u "$windows_path"`
37699    new_path="$unix_path"
37700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37702    new_path="$unix_path"
37703  fi
37704
37705    # remove trailing .exe if any
37706    new_path="${new_path/%.exe/}"
37707
37708    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37709    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37710  fi
37711
37712    else
37713      # We're on a unix platform. Hooray! :)
37714      # First separate the path from the arguments. This will split at the first
37715      # space.
37716      complete="$LIPO"
37717      path="${complete%% *}"
37718      tmp="$complete EOL"
37719      arguments="${tmp#* }"
37720
37721      # Cannot rely on the command "which" here since it doesn't always work.
37722      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37723      if test -z "$is_absolute_path"; then
37724        # Path to executable is not absolute. Find it.
37725        IFS_save="$IFS"
37726        IFS=:
37727        for p in $PATH; do
37728          if test -f "$p/$path" && test -x "$p/$path"; then
37729            new_path="$p/$path"
37730            break
37731          fi
37732        done
37733        IFS="$IFS_save"
37734      else
37735        # This is an absolute path, we can use it without further modifications.
37736        new_path="$path"
37737      fi
37738
37739      if test "x$new_path" = x; then
37740        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37741$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37742        has_space=`$ECHO "$complete" | $GREP " "`
37743        if test "x$has_space" != x; then
37744          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37745$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37746        fi
37747        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37748      fi
37749    fi
37750
37751    # Now join together the path and the arguments once again
37752    if test "x$arguments" != xEOL; then
37753      new_complete="$new_path ${arguments% *}"
37754    else
37755      new_complete="$new_path"
37756    fi
37757
37758    if test "x$complete" != "x$new_complete"; then
37759      LIPO="$new_complete"
37760      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37761$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37762    fi
37763  fi
37764
37765  fi
37766
37767  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37768    # Extract the first word of "mt", so it can be a program name with args.
37769set dummy mt; ac_word=$2
37770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37771$as_echo_n "checking for $ac_word... " >&6; }
37772if ${ac_cv_prog_MT+:} false; then :
37773  $as_echo_n "(cached) " >&6
37774else
37775  if test -n "$MT"; then
37776  ac_cv_prog_MT="$MT" # Let the user override the test.
37777else
37778  ac_prog_rejected=no
37779as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37780for as_dir in $PATH
37781do
37782  IFS=$as_save_IFS
37783  test -z "$as_dir" && as_dir=.
37784    for ac_exec_ext in '' $ac_executable_extensions; do
37785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37786    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37787       ac_prog_rejected=yes
37788       continue
37789     fi
37790    ac_cv_prog_MT="mt"
37791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37792    break 2
37793  fi
37794done
37795  done
37796IFS=$as_save_IFS
37797
37798if test $ac_prog_rejected = yes; then
37799  # We found a bogon in the path, so make sure we never use it.
37800  set dummy $ac_cv_prog_MT
37801  shift
37802  if test $# != 0; then
37803    # We chose a different compiler from the bogus one.
37804    # However, it has the same basename, so the bogon will be chosen
37805    # first if we set MT to just the basename; use the full file name.
37806    shift
37807    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37808  fi
37809fi
37810fi
37811fi
37812MT=$ac_cv_prog_MT
37813if test -n "$MT"; then
37814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37815$as_echo "$MT" >&6; }
37816else
37817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37818$as_echo "no" >&6; }
37819fi
37820
37821
37822
37823  # Only process if variable expands to non-empty
37824
37825  if test "x$MT" != x; then
37826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37827
37828  # First separate the path from the arguments. This will split at the first
37829  # space.
37830  complete="$MT"
37831  path="${complete%% *}"
37832  tmp="$complete EOL"
37833  arguments="${tmp#* }"
37834
37835  # Input might be given as Windows format, start by converting to
37836  # unix format.
37837  new_path=`$CYGPATH -u "$path"`
37838
37839  # Now try to locate executable using which
37840  new_path=`$WHICH "$new_path" 2> /dev/null`
37841  # bat and cmd files are not always considered executable in cygwin causing which
37842  # to not find them
37843  if test "x$new_path" = x \
37844      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37845      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37846    new_path=`$CYGPATH -u "$path"`
37847  fi
37848  if test "x$new_path" = x; then
37849    # Oops. Which didn't find the executable.
37850    # The splitting of arguments from the executable at a space might have been incorrect,
37851    # since paths with space are more likely in Windows. Give it another try with the whole
37852    # argument.
37853    path="$complete"
37854    arguments="EOL"
37855    new_path=`$CYGPATH -u "$path"`
37856    new_path=`$WHICH "$new_path" 2> /dev/null`
37857    # bat and cmd files are not always considered executable in cygwin causing which
37858    # to not find them
37859    if test "x$new_path" = x \
37860        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37861        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37862      new_path=`$CYGPATH -u "$path"`
37863    fi
37864    if test "x$new_path" = x; then
37865      # It's still not found. Now this is an unrecoverable error.
37866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37867$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37868      has_space=`$ECHO "$complete" | $GREP " "`
37869      if test "x$has_space" != x; then
37870        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37871$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37872      fi
37873      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37874    fi
37875  fi
37876
37877  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37878  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37879  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37880  # "foo.exe" is OK but "foo" is an error.
37881  #
37882  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37883  # It is also a way to make sure we got the proper file name for the real test later on.
37884  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37885  if test "x$test_shortpath" = x; then
37886    # Short path failed, file does not exist as specified.
37887    # Try adding .exe or .cmd
37888    if test -f "${new_path}.exe"; then
37889      input_to_shortpath="${new_path}.exe"
37890    elif test -f "${new_path}.cmd"; then
37891      input_to_shortpath="${new_path}.cmd"
37892    else
37893      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37894$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37895      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37896$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37897      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37898    fi
37899  else
37900    input_to_shortpath="$new_path"
37901  fi
37902
37903  # Call helper function which possibly converts this using DOS-style short mode.
37904  # If so, the updated path is stored in $new_path.
37905  new_path="$input_to_shortpath"
37906
37907  input_path="$input_to_shortpath"
37908  # Check if we need to convert this using DOS-style short mode. If the path
37909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37910  # take no chances and rewrite it.
37911  # Note: m4 eats our [], so we need to use [ and ] instead.
37912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37913  if test "x$has_forbidden_chars" != x; then
37914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37915    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37916    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37917    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37918      # Going to short mode and back again did indeed matter. Since short mode is
37919      # case insensitive, let's make it lowercase to improve readability.
37920      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37921      # Now convert it back to Unix-style (cygpath)
37922      input_path=`$CYGPATH -u "$shortmode_path"`
37923      new_path="$input_path"
37924    fi
37925  fi
37926
37927  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37928  if test "x$test_cygdrive_prefix" = x; then
37929    # As a simple fix, exclude /usr/bin since it's not a real path.
37930    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37931      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37932      # a path prefixed by /cygdrive for fixpath to work.
37933      new_path="$CYGWIN_ROOT_PATH$input_path"
37934    fi
37935  fi
37936
37937  # remove trailing .exe if any
37938  new_path="${new_path/%.exe/}"
37939
37940    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37941
37942  # First separate the path from the arguments. This will split at the first
37943  # space.
37944  complete="$MT"
37945  path="${complete%% *}"
37946  tmp="$complete EOL"
37947  arguments="${tmp#* }"
37948
37949  # Input might be given as Windows format, start by converting to
37950  # unix format.
37951  new_path="$path"
37952
37953  windows_path="$new_path"
37954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37955    unix_path=`$CYGPATH -u "$windows_path"`
37956    new_path="$unix_path"
37957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37959    new_path="$unix_path"
37960  fi
37961
37962
37963  # Now try to locate executable using which
37964  new_path=`$WHICH "$new_path" 2> /dev/null`
37965
37966  if test "x$new_path" = x; then
37967    # Oops. Which didn't find the executable.
37968    # The splitting of arguments from the executable at a space might have been incorrect,
37969    # since paths with space are more likely in Windows. Give it another try with the whole
37970    # argument.
37971    path="$complete"
37972    arguments="EOL"
37973    new_path="$path"
37974
37975  windows_path="$new_path"
37976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37977    unix_path=`$CYGPATH -u "$windows_path"`
37978    new_path="$unix_path"
37979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37981    new_path="$unix_path"
37982  fi
37983
37984
37985    new_path=`$WHICH "$new_path" 2> /dev/null`
37986    # bat and cmd files are not always considered executable in MSYS causing which
37987    # to not find them
37988    if test "x$new_path" = x \
37989        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37990        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37991      new_path="$path"
37992
37993  windows_path="$new_path"
37994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37995    unix_path=`$CYGPATH -u "$windows_path"`
37996    new_path="$unix_path"
37997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37999    new_path="$unix_path"
38000  fi
38001
38002    fi
38003
38004    if test "x$new_path" = x; then
38005      # It's still not found. Now this is an unrecoverable error.
38006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38007$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38008      has_space=`$ECHO "$complete" | $GREP " "`
38009      if test "x$has_space" != x; then
38010        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38011$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38012      fi
38013      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38014    fi
38015  fi
38016
38017  # Now new_path has a complete unix path to the binary
38018  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38019    # Keep paths in /bin as-is, but remove trailing .exe if any
38020    new_path="${new_path/%.exe/}"
38021    # Do not save /bin paths to all_fixpath_prefixes!
38022  else
38023    # Not in mixed or Windows style, start by that.
38024    new_path=`cmd //c echo $new_path`
38025
38026  input_path="$new_path"
38027  # Check if we need to convert this using DOS-style short mode. If the path
38028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38029  # take no chances and rewrite it.
38030  # Note: m4 eats our [], so we need to use [ and ] instead.
38031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38032  if test "x$has_forbidden_chars" != x; then
38033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38034    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38035  fi
38036
38037    # Output is in $new_path
38038
38039  windows_path="$new_path"
38040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38041    unix_path=`$CYGPATH -u "$windows_path"`
38042    new_path="$unix_path"
38043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38045    new_path="$unix_path"
38046  fi
38047
38048    # remove trailing .exe if any
38049    new_path="${new_path/%.exe/}"
38050
38051    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38052    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38053  fi
38054
38055    else
38056      # We're on a unix platform. Hooray! :)
38057      # First separate the path from the arguments. This will split at the first
38058      # space.
38059      complete="$MT"
38060      path="${complete%% *}"
38061      tmp="$complete EOL"
38062      arguments="${tmp#* }"
38063
38064      # Cannot rely on the command "which" here since it doesn't always work.
38065      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38066      if test -z "$is_absolute_path"; then
38067        # Path to executable is not absolute. Find it.
38068        IFS_save="$IFS"
38069        IFS=:
38070        for p in $PATH; do
38071          if test -f "$p/$path" && test -x "$p/$path"; then
38072            new_path="$p/$path"
38073            break
38074          fi
38075        done
38076        IFS="$IFS_save"
38077      else
38078        # This is an absolute path, we can use it without further modifications.
38079        new_path="$path"
38080      fi
38081
38082      if test "x$new_path" = x; then
38083        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38084$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38085        has_space=`$ECHO "$complete" | $GREP " "`
38086        if test "x$has_space" != x; then
38087          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38088$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38089        fi
38090        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38091      fi
38092    fi
38093
38094    # Now join together the path and the arguments once again
38095    if test "x$arguments" != xEOL; then
38096      new_complete="$new_path ${arguments% *}"
38097    else
38098      new_complete="$new_path"
38099    fi
38100
38101    if test "x$complete" != "x$new_complete"; then
38102      MT="$new_complete"
38103      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38104$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38105    fi
38106  fi
38107
38108    # Setup the resource compiler (RC)
38109    # Extract the first word of "rc", so it can be a program name with args.
38110set dummy rc; ac_word=$2
38111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38112$as_echo_n "checking for $ac_word... " >&6; }
38113if ${ac_cv_prog_RC+:} false; then :
38114  $as_echo_n "(cached) " >&6
38115else
38116  if test -n "$RC"; then
38117  ac_cv_prog_RC="$RC" # Let the user override the test.
38118else
38119  ac_prog_rejected=no
38120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38121for as_dir in $PATH
38122do
38123  IFS=$as_save_IFS
38124  test -z "$as_dir" && as_dir=.
38125    for ac_exec_ext in '' $ac_executable_extensions; do
38126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38127    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38128       ac_prog_rejected=yes
38129       continue
38130     fi
38131    ac_cv_prog_RC="rc"
38132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38133    break 2
38134  fi
38135done
38136  done
38137IFS=$as_save_IFS
38138
38139if test $ac_prog_rejected = yes; then
38140  # We found a bogon in the path, so make sure we never use it.
38141  set dummy $ac_cv_prog_RC
38142  shift
38143  if test $# != 0; then
38144    # We chose a different compiler from the bogus one.
38145    # However, it has the same basename, so the bogon will be chosen
38146    # first if we set RC to just the basename; use the full file name.
38147    shift
38148    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38149  fi
38150fi
38151fi
38152fi
38153RC=$ac_cv_prog_RC
38154if test -n "$RC"; then
38155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38156$as_echo "$RC" >&6; }
38157else
38158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38159$as_echo "no" >&6; }
38160fi
38161
38162
38163
38164  # Only process if variable expands to non-empty
38165
38166  if test "x$RC" != x; then
38167    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38168
38169  # First separate the path from the arguments. This will split at the first
38170  # space.
38171  complete="$RC"
38172  path="${complete%% *}"
38173  tmp="$complete EOL"
38174  arguments="${tmp#* }"
38175
38176  # Input might be given as Windows format, start by converting to
38177  # unix format.
38178  new_path=`$CYGPATH -u "$path"`
38179
38180  # Now try to locate executable using which
38181  new_path=`$WHICH "$new_path" 2> /dev/null`
38182  # bat and cmd files are not always considered executable in cygwin causing which
38183  # to not find them
38184  if test "x$new_path" = x \
38185      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38186      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38187    new_path=`$CYGPATH -u "$path"`
38188  fi
38189  if test "x$new_path" = x; then
38190    # Oops. Which didn't find the executable.
38191    # The splitting of arguments from the executable at a space might have been incorrect,
38192    # since paths with space are more likely in Windows. Give it another try with the whole
38193    # argument.
38194    path="$complete"
38195    arguments="EOL"
38196    new_path=`$CYGPATH -u "$path"`
38197    new_path=`$WHICH "$new_path" 2> /dev/null`
38198    # bat and cmd files are not always considered executable in cygwin causing which
38199    # to not find them
38200    if test "x$new_path" = x \
38201        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38202        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38203      new_path=`$CYGPATH -u "$path"`
38204    fi
38205    if test "x$new_path" = x; then
38206      # It's still not found. Now this is an unrecoverable error.
38207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38208$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38209      has_space=`$ECHO "$complete" | $GREP " "`
38210      if test "x$has_space" != x; then
38211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38213      fi
38214      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38215    fi
38216  fi
38217
38218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38221  # "foo.exe" is OK but "foo" is an error.
38222  #
38223  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38224  # It is also a way to make sure we got the proper file name for the real test later on.
38225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38226  if test "x$test_shortpath" = x; then
38227    # Short path failed, file does not exist as specified.
38228    # Try adding .exe or .cmd
38229    if test -f "${new_path}.exe"; then
38230      input_to_shortpath="${new_path}.exe"
38231    elif test -f "${new_path}.cmd"; then
38232      input_to_shortpath="${new_path}.cmd"
38233    else
38234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38235$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38236      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38237$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38238      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38239    fi
38240  else
38241    input_to_shortpath="$new_path"
38242  fi
38243
38244  # Call helper function which possibly converts this using DOS-style short mode.
38245  # If so, the updated path is stored in $new_path.
38246  new_path="$input_to_shortpath"
38247
38248  input_path="$input_to_shortpath"
38249  # Check if we need to convert this using DOS-style short mode. If the path
38250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38251  # take no chances and rewrite it.
38252  # Note: m4 eats our [], so we need to use [ and ] instead.
38253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38254  if test "x$has_forbidden_chars" != x; then
38255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38256    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38257    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38258    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38259      # Going to short mode and back again did indeed matter. Since short mode is
38260      # case insensitive, let's make it lowercase to improve readability.
38261      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38262      # Now convert it back to Unix-style (cygpath)
38263      input_path=`$CYGPATH -u "$shortmode_path"`
38264      new_path="$input_path"
38265    fi
38266  fi
38267
38268  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38269  if test "x$test_cygdrive_prefix" = x; then
38270    # As a simple fix, exclude /usr/bin since it's not a real path.
38271    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38272      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38273      # a path prefixed by /cygdrive for fixpath to work.
38274      new_path="$CYGWIN_ROOT_PATH$input_path"
38275    fi
38276  fi
38277
38278  # remove trailing .exe if any
38279  new_path="${new_path/%.exe/}"
38280
38281    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38282
38283  # First separate the path from the arguments. This will split at the first
38284  # space.
38285  complete="$RC"
38286  path="${complete%% *}"
38287  tmp="$complete EOL"
38288  arguments="${tmp#* }"
38289
38290  # Input might be given as Windows format, start by converting to
38291  # unix format.
38292  new_path="$path"
38293
38294  windows_path="$new_path"
38295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38296    unix_path=`$CYGPATH -u "$windows_path"`
38297    new_path="$unix_path"
38298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38300    new_path="$unix_path"
38301  fi
38302
38303
38304  # Now try to locate executable using which
38305  new_path=`$WHICH "$new_path" 2> /dev/null`
38306
38307  if test "x$new_path" = x; then
38308    # Oops. Which didn't find the executable.
38309    # The splitting of arguments from the executable at a space might have been incorrect,
38310    # since paths with space are more likely in Windows. Give it another try with the whole
38311    # argument.
38312    path="$complete"
38313    arguments="EOL"
38314    new_path="$path"
38315
38316  windows_path="$new_path"
38317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38318    unix_path=`$CYGPATH -u "$windows_path"`
38319    new_path="$unix_path"
38320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38322    new_path="$unix_path"
38323  fi
38324
38325
38326    new_path=`$WHICH "$new_path" 2> /dev/null`
38327    # bat and cmd files are not always considered executable in MSYS causing which
38328    # to not find them
38329    if test "x$new_path" = x \
38330        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38331        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38332      new_path="$path"
38333
38334  windows_path="$new_path"
38335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38336    unix_path=`$CYGPATH -u "$windows_path"`
38337    new_path="$unix_path"
38338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38340    new_path="$unix_path"
38341  fi
38342
38343    fi
38344
38345    if test "x$new_path" = x; then
38346      # It's still not found. Now this is an unrecoverable error.
38347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38348$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38349      has_space=`$ECHO "$complete" | $GREP " "`
38350      if test "x$has_space" != x; then
38351        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38352$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38353      fi
38354      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38355    fi
38356  fi
38357
38358  # Now new_path has a complete unix path to the binary
38359  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38360    # Keep paths in /bin as-is, but remove trailing .exe if any
38361    new_path="${new_path/%.exe/}"
38362    # Do not save /bin paths to all_fixpath_prefixes!
38363  else
38364    # Not in mixed or Windows style, start by that.
38365    new_path=`cmd //c echo $new_path`
38366
38367  input_path="$new_path"
38368  # Check if we need to convert this using DOS-style short mode. If the path
38369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38370  # take no chances and rewrite it.
38371  # Note: m4 eats our [], so we need to use [ and ] instead.
38372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38373  if test "x$has_forbidden_chars" != x; then
38374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38376  fi
38377
38378    # Output is in $new_path
38379
38380  windows_path="$new_path"
38381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38382    unix_path=`$CYGPATH -u "$windows_path"`
38383    new_path="$unix_path"
38384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38386    new_path="$unix_path"
38387  fi
38388
38389    # remove trailing .exe if any
38390    new_path="${new_path/%.exe/}"
38391
38392    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38393    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38394  fi
38395
38396    else
38397      # We're on a unix platform. Hooray! :)
38398      # First separate the path from the arguments. This will split at the first
38399      # space.
38400      complete="$RC"
38401      path="${complete%% *}"
38402      tmp="$complete EOL"
38403      arguments="${tmp#* }"
38404
38405      # Cannot rely on the command "which" here since it doesn't always work.
38406      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38407      if test -z "$is_absolute_path"; then
38408        # Path to executable is not absolute. Find it.
38409        IFS_save="$IFS"
38410        IFS=:
38411        for p in $PATH; do
38412          if test -f "$p/$path" && test -x "$p/$path"; then
38413            new_path="$p/$path"
38414            break
38415          fi
38416        done
38417        IFS="$IFS_save"
38418      else
38419        # This is an absolute path, we can use it without further modifications.
38420        new_path="$path"
38421      fi
38422
38423      if test "x$new_path" = x; then
38424        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38425$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38426        has_space=`$ECHO "$complete" | $GREP " "`
38427        if test "x$has_space" != x; then
38428          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38429$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38430        fi
38431        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38432      fi
38433    fi
38434
38435    # Now join together the path and the arguments once again
38436    if test "x$arguments" != xEOL; then
38437      new_complete="$new_path ${arguments% *}"
38438    else
38439      new_complete="$new_path"
38440    fi
38441
38442    if test "x$complete" != "x$new_complete"; then
38443      RC="$new_complete"
38444      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38445$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38446    fi
38447  fi
38448
38449    # Extract the first word of "dumpbin", so it can be a program name with args.
38450set dummy dumpbin; ac_word=$2
38451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38452$as_echo_n "checking for $ac_word... " >&6; }
38453if ${ac_cv_prog_DUMPBIN+:} false; then :
38454  $as_echo_n "(cached) " >&6
38455else
38456  if test -n "$DUMPBIN"; then
38457  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38458else
38459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38460for as_dir in $PATH
38461do
38462  IFS=$as_save_IFS
38463  test -z "$as_dir" && as_dir=.
38464    for ac_exec_ext in '' $ac_executable_extensions; do
38465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38466    ac_cv_prog_DUMPBIN="dumpbin"
38467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38468    break 2
38469  fi
38470done
38471  done
38472IFS=$as_save_IFS
38473
38474fi
38475fi
38476DUMPBIN=$ac_cv_prog_DUMPBIN
38477if test -n "$DUMPBIN"; then
38478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38479$as_echo "$DUMPBIN" >&6; }
38480else
38481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38482$as_echo "no" >&6; }
38483fi
38484
38485
38486
38487  # Only process if variable expands to non-empty
38488
38489  if test "x$DUMPBIN" != x; then
38490    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38491
38492  # First separate the path from the arguments. This will split at the first
38493  # space.
38494  complete="$DUMPBIN"
38495  path="${complete%% *}"
38496  tmp="$complete EOL"
38497  arguments="${tmp#* }"
38498
38499  # Input might be given as Windows format, start by converting to
38500  # unix format.
38501  new_path=`$CYGPATH -u "$path"`
38502
38503  # Now try to locate executable using which
38504  new_path=`$WHICH "$new_path" 2> /dev/null`
38505  # bat and cmd files are not always considered executable in cygwin causing which
38506  # to not find them
38507  if test "x$new_path" = x \
38508      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38509      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38510    new_path=`$CYGPATH -u "$path"`
38511  fi
38512  if test "x$new_path" = x; then
38513    # Oops. Which didn't find the executable.
38514    # The splitting of arguments from the executable at a space might have been incorrect,
38515    # since paths with space are more likely in Windows. Give it another try with the whole
38516    # argument.
38517    path="$complete"
38518    arguments="EOL"
38519    new_path=`$CYGPATH -u "$path"`
38520    new_path=`$WHICH "$new_path" 2> /dev/null`
38521    # bat and cmd files are not always considered executable in cygwin causing which
38522    # to not find them
38523    if test "x$new_path" = x \
38524        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38525        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38526      new_path=`$CYGPATH -u "$path"`
38527    fi
38528    if test "x$new_path" = x; then
38529      # It's still not found. Now this is an unrecoverable error.
38530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38531$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38532      has_space=`$ECHO "$complete" | $GREP " "`
38533      if test "x$has_space" != x; then
38534        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38535$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38536      fi
38537      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38538    fi
38539  fi
38540
38541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38544  # "foo.exe" is OK but "foo" is an error.
38545  #
38546  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38547  # It is also a way to make sure we got the proper file name for the real test later on.
38548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38549  if test "x$test_shortpath" = x; then
38550    # Short path failed, file does not exist as specified.
38551    # Try adding .exe or .cmd
38552    if test -f "${new_path}.exe"; then
38553      input_to_shortpath="${new_path}.exe"
38554    elif test -f "${new_path}.cmd"; then
38555      input_to_shortpath="${new_path}.cmd"
38556    else
38557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38558$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38559      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38560$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38561      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38562    fi
38563  else
38564    input_to_shortpath="$new_path"
38565  fi
38566
38567  # Call helper function which possibly converts this using DOS-style short mode.
38568  # If so, the updated path is stored in $new_path.
38569  new_path="$input_to_shortpath"
38570
38571  input_path="$input_to_shortpath"
38572  # Check if we need to convert this using DOS-style short mode. If the path
38573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38574  # take no chances and rewrite it.
38575  # Note: m4 eats our [], so we need to use [ and ] instead.
38576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38577  if test "x$has_forbidden_chars" != x; then
38578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38582      # Going to short mode and back again did indeed matter. Since short mode is
38583      # case insensitive, let's make it lowercase to improve readability.
38584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38585      # Now convert it back to Unix-style (cygpath)
38586      input_path=`$CYGPATH -u "$shortmode_path"`
38587      new_path="$input_path"
38588    fi
38589  fi
38590
38591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38592  if test "x$test_cygdrive_prefix" = x; then
38593    # As a simple fix, exclude /usr/bin since it's not a real path.
38594    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38596      # a path prefixed by /cygdrive for fixpath to work.
38597      new_path="$CYGWIN_ROOT_PATH$input_path"
38598    fi
38599  fi
38600
38601  # remove trailing .exe if any
38602  new_path="${new_path/%.exe/}"
38603
38604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38605
38606  # First separate the path from the arguments. This will split at the first
38607  # space.
38608  complete="$DUMPBIN"
38609  path="${complete%% *}"
38610  tmp="$complete EOL"
38611  arguments="${tmp#* }"
38612
38613  # Input might be given as Windows format, start by converting to
38614  # unix format.
38615  new_path="$path"
38616
38617  windows_path="$new_path"
38618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38619    unix_path=`$CYGPATH -u "$windows_path"`
38620    new_path="$unix_path"
38621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38623    new_path="$unix_path"
38624  fi
38625
38626
38627  # Now try to locate executable using which
38628  new_path=`$WHICH "$new_path" 2> /dev/null`
38629
38630  if test "x$new_path" = x; then
38631    # Oops. Which didn't find the executable.
38632    # The splitting of arguments from the executable at a space might have been incorrect,
38633    # since paths with space are more likely in Windows. Give it another try with the whole
38634    # argument.
38635    path="$complete"
38636    arguments="EOL"
38637    new_path="$path"
38638
38639  windows_path="$new_path"
38640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38641    unix_path=`$CYGPATH -u "$windows_path"`
38642    new_path="$unix_path"
38643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38645    new_path="$unix_path"
38646  fi
38647
38648
38649    new_path=`$WHICH "$new_path" 2> /dev/null`
38650    # bat and cmd files are not always considered executable in MSYS 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="$path"
38656
38657  windows_path="$new_path"
38658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38659    unix_path=`$CYGPATH -u "$windows_path"`
38660    new_path="$unix_path"
38661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38663    new_path="$unix_path"
38664  fi
38665
38666    fi
38667
38668    if test "x$new_path" = x; then
38669      # It's still not found. Now this is an unrecoverable error.
38670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38671$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38672      has_space=`$ECHO "$complete" | $GREP " "`
38673      if test "x$has_space" != x; then
38674        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38675$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38676      fi
38677      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38678    fi
38679  fi
38680
38681  # Now new_path has a complete unix path to the binary
38682  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38683    # Keep paths in /bin as-is, but remove trailing .exe if any
38684    new_path="${new_path/%.exe/}"
38685    # Do not save /bin paths to all_fixpath_prefixes!
38686  else
38687    # Not in mixed or Windows style, start by that.
38688    new_path=`cmd //c echo $new_path`
38689
38690  input_path="$new_path"
38691  # Check if we need to convert this using DOS-style short mode. If the path
38692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38693  # take no chances and rewrite it.
38694  # Note: m4 eats our [], so we need to use [ and ] instead.
38695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38696  if test "x$has_forbidden_chars" != x; then
38697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38699  fi
38700
38701    # Output is in $new_path
38702
38703  windows_path="$new_path"
38704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38705    unix_path=`$CYGPATH -u "$windows_path"`
38706    new_path="$unix_path"
38707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38709    new_path="$unix_path"
38710  fi
38711
38712    # remove trailing .exe if any
38713    new_path="${new_path/%.exe/}"
38714
38715    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38716    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38717  fi
38718
38719    else
38720      # We're on a unix platform. Hooray! :)
38721      # First separate the path from the arguments. This will split at the first
38722      # space.
38723      complete="$DUMPBIN"
38724      path="${complete%% *}"
38725      tmp="$complete EOL"
38726      arguments="${tmp#* }"
38727
38728      # Cannot rely on the command "which" here since it doesn't always work.
38729      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38730      if test -z "$is_absolute_path"; then
38731        # Path to executable is not absolute. Find it.
38732        IFS_save="$IFS"
38733        IFS=:
38734        for p in $PATH; do
38735          if test -f "$p/$path" && test -x "$p/$path"; then
38736            new_path="$p/$path"
38737            break
38738          fi
38739        done
38740        IFS="$IFS_save"
38741      else
38742        # This is an absolute path, we can use it without further modifications.
38743        new_path="$path"
38744      fi
38745
38746      if test "x$new_path" = x; then
38747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38748$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38749        has_space=`$ECHO "$complete" | $GREP " "`
38750        if test "x$has_space" != x; then
38751          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38752$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38753        fi
38754        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38755      fi
38756    fi
38757
38758    # Now join together the path and the arguments once again
38759    if test "x$arguments" != xEOL; then
38760      new_complete="$new_path ${arguments% *}"
38761    else
38762      new_complete="$new_path"
38763    fi
38764
38765    if test "x$complete" != "x$new_complete"; then
38766      DUMPBIN="$new_complete"
38767      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38768$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38769    fi
38770  fi
38771
38772    # We need to check for 'msbuild.exe' because at the place where we expect to
38773    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38774    # won't find the 'msbuild.exe' executable in that case (and the
38775    # 'ac_executable_extensions' is unusable due to performance reasons).
38776    # Notice that we intentionally don't fix up the path to MSBUILD because we
38777    # will call it in a DOS shell during freetype detection on Windows (see
38778    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38779    # Extract the first word of "msbuild.exe", so it can be a program name with args.
38780set dummy msbuild.exe; ac_word=$2
38781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38782$as_echo_n "checking for $ac_word... " >&6; }
38783if ${ac_cv_prog_MSBUILD+:} false; then :
38784  $as_echo_n "(cached) " >&6
38785else
38786  if test -n "$MSBUILD"; then
38787  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38788else
38789as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38790for as_dir in $PATH
38791do
38792  IFS=$as_save_IFS
38793  test -z "$as_dir" && as_dir=.
38794    for ac_exec_ext in '' $ac_executable_extensions; do
38795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38796    ac_cv_prog_MSBUILD="msbuild.exe"
38797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38798    break 2
38799  fi
38800done
38801  done
38802IFS=$as_save_IFS
38803
38804fi
38805fi
38806MSBUILD=$ac_cv_prog_MSBUILD
38807if test -n "$MSBUILD"; then
38808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38809$as_echo "$MSBUILD" >&6; }
38810else
38811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38812$as_echo "no" >&6; }
38813fi
38814
38815
38816  fi
38817
38818  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38819
38820
38821  # Publish this variable in the help.
38822
38823
38824  if [ -z "${STRIP+x}" ]; then
38825    # The variable is not set by user, try to locate tool using the code snippet
38826    for ac_prog in strip
38827do
38828  # Extract the first word of "$ac_prog", so it can be a program name with args.
38829set dummy $ac_prog; ac_word=$2
38830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38831$as_echo_n "checking for $ac_word... " >&6; }
38832if ${ac_cv_path_STRIP+:} false; then :
38833  $as_echo_n "(cached) " >&6
38834else
38835  case $STRIP in
38836  [\\/]* | ?:[\\/]*)
38837  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38838  ;;
38839  *)
38840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38841for as_dir in $PATH
38842do
38843  IFS=$as_save_IFS
38844  test -z "$as_dir" && as_dir=.
38845    for ac_exec_ext in '' $ac_executable_extensions; do
38846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38847    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38849    break 2
38850  fi
38851done
38852  done
38853IFS=$as_save_IFS
38854
38855  ;;
38856esac
38857fi
38858STRIP=$ac_cv_path_STRIP
38859if test -n "$STRIP"; then
38860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38861$as_echo "$STRIP" >&6; }
38862else
38863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38864$as_echo "no" >&6; }
38865fi
38866
38867
38868  test -n "$STRIP" && break
38869done
38870
38871  else
38872    # The variable is set, but is it from the command line or the environment?
38873
38874    # Try to remove the string !STRIP! from our list.
38875    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38876    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38877      # If it failed, the variable was not from the command line. Ignore it,
38878      # but warn the user (except for BASH, which is always set by the calling BASH).
38879      if test "xSTRIP" != xBASH; then
38880        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38881$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38882      fi
38883      # Try to locate tool using the code snippet
38884      for ac_prog in strip
38885do
38886  # Extract the first word of "$ac_prog", so it can be a program name with args.
38887set dummy $ac_prog; ac_word=$2
38888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38889$as_echo_n "checking for $ac_word... " >&6; }
38890if ${ac_cv_path_STRIP+:} false; then :
38891  $as_echo_n "(cached) " >&6
38892else
38893  case $STRIP in
38894  [\\/]* | ?:[\\/]*)
38895  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38896  ;;
38897  *)
38898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38899for as_dir in $PATH
38900do
38901  IFS=$as_save_IFS
38902  test -z "$as_dir" && as_dir=.
38903    for ac_exec_ext in '' $ac_executable_extensions; do
38904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38905    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38907    break 2
38908  fi
38909done
38910  done
38911IFS=$as_save_IFS
38912
38913  ;;
38914esac
38915fi
38916STRIP=$ac_cv_path_STRIP
38917if test -n "$STRIP"; then
38918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38919$as_echo "$STRIP" >&6; }
38920else
38921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38922$as_echo "no" >&6; }
38923fi
38924
38925
38926  test -n "$STRIP" && break
38927done
38928
38929    else
38930      # If it succeeded, then it was overridden by the user. We will use it
38931      # for the tool.
38932
38933      # First remove it from the list of overridden variables, so we can test
38934      # for unknown variables in the end.
38935      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38936
38937      # Check if we try to supply an empty value
38938      if test "x$STRIP" = x; then
38939        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38940$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38941        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38942$as_echo_n "checking for STRIP... " >&6; }
38943        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38944$as_echo "disabled" >&6; }
38945      else
38946        # Check if the provided tool contains a complete path.
38947        tool_specified="$STRIP"
38948        tool_basename="${tool_specified##*/}"
38949        if test "x$tool_basename" = "x$tool_specified"; then
38950          # A command without a complete path is provided, search $PATH.
38951          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38952$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38953          # Extract the first word of "$tool_basename", so it can be a program name with args.
38954set dummy $tool_basename; ac_word=$2
38955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38956$as_echo_n "checking for $ac_word... " >&6; }
38957if ${ac_cv_path_STRIP+:} false; then :
38958  $as_echo_n "(cached) " >&6
38959else
38960  case $STRIP in
38961  [\\/]* | ?:[\\/]*)
38962  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38963  ;;
38964  *)
38965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38966for as_dir in $PATH
38967do
38968  IFS=$as_save_IFS
38969  test -z "$as_dir" && as_dir=.
38970    for ac_exec_ext in '' $ac_executable_extensions; do
38971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38972    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38974    break 2
38975  fi
38976done
38977  done
38978IFS=$as_save_IFS
38979
38980  ;;
38981esac
38982fi
38983STRIP=$ac_cv_path_STRIP
38984if test -n "$STRIP"; then
38985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38986$as_echo "$STRIP" >&6; }
38987else
38988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38989$as_echo "no" >&6; }
38990fi
38991
38992
38993          if test "x$STRIP" = x; then
38994            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38995          fi
38996        else
38997          # Otherwise we believe it is a complete path. Use it as it is.
38998          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38999$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39000          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39001$as_echo_n "checking for STRIP... " >&6; }
39002          if test ! -x "$tool_specified"; then
39003            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39004$as_echo "not found" >&6; }
39005            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39006          fi
39007          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39008$as_echo "$tool_specified" >&6; }
39009        fi
39010      fi
39011    fi
39012
39013  fi
39014
39015
39016
39017  # Only process if variable expands to non-empty
39018
39019  if test "x$STRIP" != x; then
39020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39021
39022  # First separate the path from the arguments. This will split at the first
39023  # space.
39024  complete="$STRIP"
39025  path="${complete%% *}"
39026  tmp="$complete EOL"
39027  arguments="${tmp#* }"
39028
39029  # Input might be given as Windows format, start by converting to
39030  # unix format.
39031  new_path=`$CYGPATH -u "$path"`
39032
39033  # Now try to locate executable using which
39034  new_path=`$WHICH "$new_path" 2> /dev/null`
39035  # bat and cmd files are not always considered executable in cygwin causing which
39036  # to not find them
39037  if test "x$new_path" = x \
39038      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39039      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39040    new_path=`$CYGPATH -u "$path"`
39041  fi
39042  if test "x$new_path" = x; then
39043    # Oops. Which didn't find the executable.
39044    # The splitting of arguments from the executable at a space might have been incorrect,
39045    # since paths with space are more likely in Windows. Give it another try with the whole
39046    # argument.
39047    path="$complete"
39048    arguments="EOL"
39049    new_path=`$CYGPATH -u "$path"`
39050    new_path=`$WHICH "$new_path" 2> /dev/null`
39051    # bat and cmd files are not always considered executable in cygwin causing which
39052    # to not find them
39053    if test "x$new_path" = x \
39054        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39055        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39056      new_path=`$CYGPATH -u "$path"`
39057    fi
39058    if test "x$new_path" = x; then
39059      # It's still not found. Now this is an unrecoverable error.
39060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39061$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39062      has_space=`$ECHO "$complete" | $GREP " "`
39063      if test "x$has_space" != x; then
39064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39066      fi
39067      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39068    fi
39069  fi
39070
39071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39074  # "foo.exe" is OK but "foo" is an error.
39075  #
39076  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39077  # It is also a way to make sure we got the proper file name for the real test later on.
39078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39079  if test "x$test_shortpath" = x; then
39080    # Short path failed, file does not exist as specified.
39081    # Try adding .exe or .cmd
39082    if test -f "${new_path}.exe"; then
39083      input_to_shortpath="${new_path}.exe"
39084    elif test -f "${new_path}.cmd"; then
39085      input_to_shortpath="${new_path}.cmd"
39086    else
39087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39088$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39089      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39090$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39091      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39092    fi
39093  else
39094    input_to_shortpath="$new_path"
39095  fi
39096
39097  # Call helper function which possibly converts this using DOS-style short mode.
39098  # If so, the updated path is stored in $new_path.
39099  new_path="$input_to_shortpath"
39100
39101  input_path="$input_to_shortpath"
39102  # Check if we need to convert this using DOS-style short mode. If the path
39103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39104  # take no chances and rewrite it.
39105  # Note: m4 eats our [], so we need to use [ and ] instead.
39106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39107  if test "x$has_forbidden_chars" != x; then
39108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39112      # Going to short mode and back again did indeed matter. Since short mode is
39113      # case insensitive, let's make it lowercase to improve readability.
39114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39115      # Now convert it back to Unix-style (cygpath)
39116      input_path=`$CYGPATH -u "$shortmode_path"`
39117      new_path="$input_path"
39118    fi
39119  fi
39120
39121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39122  if test "x$test_cygdrive_prefix" = x; then
39123    # As a simple fix, exclude /usr/bin since it's not a real path.
39124    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39126      # a path prefixed by /cygdrive for fixpath to work.
39127      new_path="$CYGWIN_ROOT_PATH$input_path"
39128    fi
39129  fi
39130
39131  # remove trailing .exe if any
39132  new_path="${new_path/%.exe/}"
39133
39134    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39135
39136  # First separate the path from the arguments. This will split at the first
39137  # space.
39138  complete="$STRIP"
39139  path="${complete%% *}"
39140  tmp="$complete EOL"
39141  arguments="${tmp#* }"
39142
39143  # Input might be given as Windows format, start by converting to
39144  # unix format.
39145  new_path="$path"
39146
39147  windows_path="$new_path"
39148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39149    unix_path=`$CYGPATH -u "$windows_path"`
39150    new_path="$unix_path"
39151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39153    new_path="$unix_path"
39154  fi
39155
39156
39157  # Now try to locate executable using which
39158  new_path=`$WHICH "$new_path" 2> /dev/null`
39159
39160  if test "x$new_path" = x; then
39161    # Oops. Which didn't find the executable.
39162    # The splitting of arguments from the executable at a space might have been incorrect,
39163    # since paths with space are more likely in Windows. Give it another try with the whole
39164    # argument.
39165    path="$complete"
39166    arguments="EOL"
39167    new_path="$path"
39168
39169  windows_path="$new_path"
39170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39171    unix_path=`$CYGPATH -u "$windows_path"`
39172    new_path="$unix_path"
39173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39175    new_path="$unix_path"
39176  fi
39177
39178
39179    new_path=`$WHICH "$new_path" 2> /dev/null`
39180    # bat and cmd files are not always considered executable in MSYS causing which
39181    # to not find them
39182    if test "x$new_path" = x \
39183        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39184        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39185      new_path="$path"
39186
39187  windows_path="$new_path"
39188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39189    unix_path=`$CYGPATH -u "$windows_path"`
39190    new_path="$unix_path"
39191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39193    new_path="$unix_path"
39194  fi
39195
39196    fi
39197
39198    if test "x$new_path" = x; then
39199      # It's still not found. Now this is an unrecoverable error.
39200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39201$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39202      has_space=`$ECHO "$complete" | $GREP " "`
39203      if test "x$has_space" != x; then
39204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39206      fi
39207      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39208    fi
39209  fi
39210
39211  # Now new_path has a complete unix path to the binary
39212  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39213    # Keep paths in /bin as-is, but remove trailing .exe if any
39214    new_path="${new_path/%.exe/}"
39215    # Do not save /bin paths to all_fixpath_prefixes!
39216  else
39217    # Not in mixed or Windows style, start by that.
39218    new_path=`cmd //c echo $new_path`
39219
39220  input_path="$new_path"
39221  # Check if we need to convert this using DOS-style short mode. If the path
39222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39223  # take no chances and rewrite it.
39224  # Note: m4 eats our [], so we need to use [ and ] instead.
39225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39226  if test "x$has_forbidden_chars" != x; then
39227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39229  fi
39230
39231    # Output is in $new_path
39232
39233  windows_path="$new_path"
39234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39235    unix_path=`$CYGPATH -u "$windows_path"`
39236    new_path="$unix_path"
39237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39239    new_path="$unix_path"
39240  fi
39241
39242    # remove trailing .exe if any
39243    new_path="${new_path/%.exe/}"
39244
39245    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39246    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39247  fi
39248
39249    else
39250      # We're on a unix platform. Hooray! :)
39251      # First separate the path from the arguments. This will split at the first
39252      # space.
39253      complete="$STRIP"
39254      path="${complete%% *}"
39255      tmp="$complete EOL"
39256      arguments="${tmp#* }"
39257
39258      # Cannot rely on the command "which" here since it doesn't always work.
39259      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39260      if test -z "$is_absolute_path"; then
39261        # Path to executable is not absolute. Find it.
39262        IFS_save="$IFS"
39263        IFS=:
39264        for p in $PATH; do
39265          if test -f "$p/$path" && test -x "$p/$path"; then
39266            new_path="$p/$path"
39267            break
39268          fi
39269        done
39270        IFS="$IFS_save"
39271      else
39272        # This is an absolute path, we can use it without further modifications.
39273        new_path="$path"
39274      fi
39275
39276      if test "x$new_path" = x; then
39277        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39278$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39279        has_space=`$ECHO "$complete" | $GREP " "`
39280        if test "x$has_space" != x; then
39281          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39282$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39283        fi
39284        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39285      fi
39286    fi
39287
39288    # Now join together the path and the arguments once again
39289    if test "x$arguments" != xEOL; then
39290      new_complete="$new_path ${arguments% *}"
39291    else
39292      new_complete="$new_path"
39293    fi
39294
39295    if test "x$complete" != "x$new_complete"; then
39296      STRIP="$new_complete"
39297      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39298$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39299    fi
39300  fi
39301
39302
39303
39304  # Publish this variable in the help.
39305
39306
39307  if [ -z "${NM+x}" ]; then
39308    # The variable is not set by user, try to locate tool using the code snippet
39309    for ac_prog in nm
39310do
39311  # Extract the first word of "$ac_prog", so it can be a program name with args.
39312set dummy $ac_prog; ac_word=$2
39313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39314$as_echo_n "checking for $ac_word... " >&6; }
39315if ${ac_cv_path_NM+:} false; then :
39316  $as_echo_n "(cached) " >&6
39317else
39318  case $NM in
39319  [\\/]* | ?:[\\/]*)
39320  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39321  ;;
39322  *)
39323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39324for as_dir in $PATH
39325do
39326  IFS=$as_save_IFS
39327  test -z "$as_dir" && as_dir=.
39328    for ac_exec_ext in '' $ac_executable_extensions; do
39329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39330    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39332    break 2
39333  fi
39334done
39335  done
39336IFS=$as_save_IFS
39337
39338  ;;
39339esac
39340fi
39341NM=$ac_cv_path_NM
39342if test -n "$NM"; then
39343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39344$as_echo "$NM" >&6; }
39345else
39346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39347$as_echo "no" >&6; }
39348fi
39349
39350
39351  test -n "$NM" && break
39352done
39353
39354  else
39355    # The variable is set, but is it from the command line or the environment?
39356
39357    # Try to remove the string !NM! from our list.
39358    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39359    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39360      # If it failed, the variable was not from the command line. Ignore it,
39361      # but warn the user (except for BASH, which is always set by the calling BASH).
39362      if test "xNM" != xBASH; then
39363        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39364$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39365      fi
39366      # Try to locate tool using the code snippet
39367      for ac_prog in nm
39368do
39369  # Extract the first word of "$ac_prog", so it can be a program name with args.
39370set dummy $ac_prog; ac_word=$2
39371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39372$as_echo_n "checking for $ac_word... " >&6; }
39373if ${ac_cv_path_NM+:} false; then :
39374  $as_echo_n "(cached) " >&6
39375else
39376  case $NM in
39377  [\\/]* | ?:[\\/]*)
39378  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39379  ;;
39380  *)
39381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39382for as_dir in $PATH
39383do
39384  IFS=$as_save_IFS
39385  test -z "$as_dir" && as_dir=.
39386    for ac_exec_ext in '' $ac_executable_extensions; do
39387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39388    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39390    break 2
39391  fi
39392done
39393  done
39394IFS=$as_save_IFS
39395
39396  ;;
39397esac
39398fi
39399NM=$ac_cv_path_NM
39400if test -n "$NM"; then
39401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39402$as_echo "$NM" >&6; }
39403else
39404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39405$as_echo "no" >&6; }
39406fi
39407
39408
39409  test -n "$NM" && break
39410done
39411
39412    else
39413      # If it succeeded, then it was overridden by the user. We will use it
39414      # for the tool.
39415
39416      # First remove it from the list of overridden variables, so we can test
39417      # for unknown variables in the end.
39418      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39419
39420      # Check if we try to supply an empty value
39421      if test "x$NM" = x; then
39422        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39423$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39424        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39425$as_echo_n "checking for NM... " >&6; }
39426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39427$as_echo "disabled" >&6; }
39428      else
39429        # Check if the provided tool contains a complete path.
39430        tool_specified="$NM"
39431        tool_basename="${tool_specified##*/}"
39432        if test "x$tool_basename" = "x$tool_specified"; then
39433          # A command without a complete path is provided, search $PATH.
39434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39435$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39436          # Extract the first word of "$tool_basename", so it can be a program name with args.
39437set dummy $tool_basename; ac_word=$2
39438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39439$as_echo_n "checking for $ac_word... " >&6; }
39440if ${ac_cv_path_NM+:} false; then :
39441  $as_echo_n "(cached) " >&6
39442else
39443  case $NM in
39444  [\\/]* | ?:[\\/]*)
39445  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39446  ;;
39447  *)
39448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39449for as_dir in $PATH
39450do
39451  IFS=$as_save_IFS
39452  test -z "$as_dir" && as_dir=.
39453    for ac_exec_ext in '' $ac_executable_extensions; do
39454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39455    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39457    break 2
39458  fi
39459done
39460  done
39461IFS=$as_save_IFS
39462
39463  ;;
39464esac
39465fi
39466NM=$ac_cv_path_NM
39467if test -n "$NM"; then
39468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39469$as_echo "$NM" >&6; }
39470else
39471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39472$as_echo "no" >&6; }
39473fi
39474
39475
39476          if test "x$NM" = x; then
39477            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39478          fi
39479        else
39480          # Otherwise we believe it is a complete path. Use it as it is.
39481          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39482$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39483          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39484$as_echo_n "checking for NM... " >&6; }
39485          if test ! -x "$tool_specified"; then
39486            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39487$as_echo "not found" >&6; }
39488            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39489          fi
39490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39491$as_echo "$tool_specified" >&6; }
39492        fi
39493      fi
39494    fi
39495
39496  fi
39497
39498
39499
39500  # Only process if variable expands to non-empty
39501
39502  if test "x$NM" != x; then
39503    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39504
39505  # First separate the path from the arguments. This will split at the first
39506  # space.
39507  complete="$NM"
39508  path="${complete%% *}"
39509  tmp="$complete EOL"
39510  arguments="${tmp#* }"
39511
39512  # Input might be given as Windows format, start by converting to
39513  # unix format.
39514  new_path=`$CYGPATH -u "$path"`
39515
39516  # Now try to locate executable using which
39517  new_path=`$WHICH "$new_path" 2> /dev/null`
39518  # bat and cmd files are not always considered executable in cygwin causing which
39519  # to not find them
39520  if test "x$new_path" = x \
39521      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39522      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39523    new_path=`$CYGPATH -u "$path"`
39524  fi
39525  if test "x$new_path" = x; then
39526    # Oops. Which didn't find the executable.
39527    # The splitting of arguments from the executable at a space might have been incorrect,
39528    # since paths with space are more likely in Windows. Give it another try with the whole
39529    # argument.
39530    path="$complete"
39531    arguments="EOL"
39532    new_path=`$CYGPATH -u "$path"`
39533    new_path=`$WHICH "$new_path" 2> /dev/null`
39534    # bat and cmd files are not always considered executable in cygwin causing which
39535    # to not find them
39536    if test "x$new_path" = x \
39537        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39538        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39539      new_path=`$CYGPATH -u "$path"`
39540    fi
39541    if test "x$new_path" = x; then
39542      # It's still not found. Now this is an unrecoverable error.
39543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39544$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39545      has_space=`$ECHO "$complete" | $GREP " "`
39546      if test "x$has_space" != x; then
39547        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39548$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39549      fi
39550      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39551    fi
39552  fi
39553
39554  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39555  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39556  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39557  # "foo.exe" is OK but "foo" is an error.
39558  #
39559  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39560  # It is also a way to make sure we got the proper file name for the real test later on.
39561  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39562  if test "x$test_shortpath" = x; then
39563    # Short path failed, file does not exist as specified.
39564    # Try adding .exe or .cmd
39565    if test -f "${new_path}.exe"; then
39566      input_to_shortpath="${new_path}.exe"
39567    elif test -f "${new_path}.cmd"; then
39568      input_to_shortpath="${new_path}.cmd"
39569    else
39570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39571$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39572      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39573$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39574      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39575    fi
39576  else
39577    input_to_shortpath="$new_path"
39578  fi
39579
39580  # Call helper function which possibly converts this using DOS-style short mode.
39581  # If so, the updated path is stored in $new_path.
39582  new_path="$input_to_shortpath"
39583
39584  input_path="$input_to_shortpath"
39585  # Check if we need to convert this using DOS-style short mode. If the path
39586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39587  # take no chances and rewrite it.
39588  # Note: m4 eats our [], so we need to use [ and ] instead.
39589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39590  if test "x$has_forbidden_chars" != x; then
39591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39592    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39593    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39594    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39595      # Going to short mode and back again did indeed matter. Since short mode is
39596      # case insensitive, let's make it lowercase to improve readability.
39597      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39598      # Now convert it back to Unix-style (cygpath)
39599      input_path=`$CYGPATH -u "$shortmode_path"`
39600      new_path="$input_path"
39601    fi
39602  fi
39603
39604  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39605  if test "x$test_cygdrive_prefix" = x; then
39606    # As a simple fix, exclude /usr/bin since it's not a real path.
39607    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39608      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39609      # a path prefixed by /cygdrive for fixpath to work.
39610      new_path="$CYGWIN_ROOT_PATH$input_path"
39611    fi
39612  fi
39613
39614  # remove trailing .exe if any
39615  new_path="${new_path/%.exe/}"
39616
39617    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39618
39619  # First separate the path from the arguments. This will split at the first
39620  # space.
39621  complete="$NM"
39622  path="${complete%% *}"
39623  tmp="$complete EOL"
39624  arguments="${tmp#* }"
39625
39626  # Input might be given as Windows format, start by converting to
39627  # unix format.
39628  new_path="$path"
39629
39630  windows_path="$new_path"
39631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39632    unix_path=`$CYGPATH -u "$windows_path"`
39633    new_path="$unix_path"
39634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39636    new_path="$unix_path"
39637  fi
39638
39639
39640  # Now try to locate executable using which
39641  new_path=`$WHICH "$new_path" 2> /dev/null`
39642
39643  if test "x$new_path" = x; then
39644    # Oops. Which didn't find the executable.
39645    # The splitting of arguments from the executable at a space might have been incorrect,
39646    # since paths with space are more likely in Windows. Give it another try with the whole
39647    # argument.
39648    path="$complete"
39649    arguments="EOL"
39650    new_path="$path"
39651
39652  windows_path="$new_path"
39653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39654    unix_path=`$CYGPATH -u "$windows_path"`
39655    new_path="$unix_path"
39656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39658    new_path="$unix_path"
39659  fi
39660
39661
39662    new_path=`$WHICH "$new_path" 2> /dev/null`
39663    # bat and cmd files are not always considered executable in MSYS causing which
39664    # to not find them
39665    if test "x$new_path" = x \
39666        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39667        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39668      new_path="$path"
39669
39670  windows_path="$new_path"
39671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39672    unix_path=`$CYGPATH -u "$windows_path"`
39673    new_path="$unix_path"
39674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39676    new_path="$unix_path"
39677  fi
39678
39679    fi
39680
39681    if test "x$new_path" = x; then
39682      # It's still not found. Now this is an unrecoverable error.
39683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39684$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39685      has_space=`$ECHO "$complete" | $GREP " "`
39686      if test "x$has_space" != x; then
39687        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39688$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39689      fi
39690      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39691    fi
39692  fi
39693
39694  # Now new_path has a complete unix path to the binary
39695  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39696    # Keep paths in /bin as-is, but remove trailing .exe if any
39697    new_path="${new_path/%.exe/}"
39698    # Do not save /bin paths to all_fixpath_prefixes!
39699  else
39700    # Not in mixed or Windows style, start by that.
39701    new_path=`cmd //c echo $new_path`
39702
39703  input_path="$new_path"
39704  # Check if we need to convert this using DOS-style short mode. If the path
39705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39706  # take no chances and rewrite it.
39707  # Note: m4 eats our [], so we need to use [ and ] instead.
39708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39709  if test "x$has_forbidden_chars" != x; then
39710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39711    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39712  fi
39713
39714    # Output is in $new_path
39715
39716  windows_path="$new_path"
39717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39718    unix_path=`$CYGPATH -u "$windows_path"`
39719    new_path="$unix_path"
39720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39722    new_path="$unix_path"
39723  fi
39724
39725    # remove trailing .exe if any
39726    new_path="${new_path/%.exe/}"
39727
39728    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39729    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39730  fi
39731
39732    else
39733      # We're on a unix platform. Hooray! :)
39734      # First separate the path from the arguments. This will split at the first
39735      # space.
39736      complete="$NM"
39737      path="${complete%% *}"
39738      tmp="$complete EOL"
39739      arguments="${tmp#* }"
39740
39741      # Cannot rely on the command "which" here since it doesn't always work.
39742      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39743      if test -z "$is_absolute_path"; then
39744        # Path to executable is not absolute. Find it.
39745        IFS_save="$IFS"
39746        IFS=:
39747        for p in $PATH; do
39748          if test -f "$p/$path" && test -x "$p/$path"; then
39749            new_path="$p/$path"
39750            break
39751          fi
39752        done
39753        IFS="$IFS_save"
39754      else
39755        # This is an absolute path, we can use it without further modifications.
39756        new_path="$path"
39757      fi
39758
39759      if test "x$new_path" = x; then
39760        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39761$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39762        has_space=`$ECHO "$complete" | $GREP " "`
39763        if test "x$has_space" != x; then
39764          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39765$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39766        fi
39767        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39768      fi
39769    fi
39770
39771    # Now join together the path and the arguments once again
39772    if test "x$arguments" != xEOL; then
39773      new_complete="$new_path ${arguments% *}"
39774    else
39775      new_complete="$new_path"
39776    fi
39777
39778    if test "x$complete" != "x$new_complete"; then
39779      NM="$new_complete"
39780      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39781$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39782    fi
39783  fi
39784
39785
39786
39787  # Publish this variable in the help.
39788
39789
39790  if [ -z "${GNM+x}" ]; then
39791    # The variable is not set by user, try to locate tool using the code snippet
39792    for ac_prog in gnm
39793do
39794  # Extract the first word of "$ac_prog", so it can be a program name with args.
39795set dummy $ac_prog; ac_word=$2
39796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39797$as_echo_n "checking for $ac_word... " >&6; }
39798if ${ac_cv_path_GNM+:} false; then :
39799  $as_echo_n "(cached) " >&6
39800else
39801  case $GNM in
39802  [\\/]* | ?:[\\/]*)
39803  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39804  ;;
39805  *)
39806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39807for as_dir in $PATH
39808do
39809  IFS=$as_save_IFS
39810  test -z "$as_dir" && as_dir=.
39811    for ac_exec_ext in '' $ac_executable_extensions; do
39812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39813    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39815    break 2
39816  fi
39817done
39818  done
39819IFS=$as_save_IFS
39820
39821  ;;
39822esac
39823fi
39824GNM=$ac_cv_path_GNM
39825if test -n "$GNM"; then
39826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39827$as_echo "$GNM" >&6; }
39828else
39829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39830$as_echo "no" >&6; }
39831fi
39832
39833
39834  test -n "$GNM" && break
39835done
39836
39837  else
39838    # The variable is set, but is it from the command line or the environment?
39839
39840    # Try to remove the string !GNM! from our list.
39841    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39842    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39843      # If it failed, the variable was not from the command line. Ignore it,
39844      # but warn the user (except for BASH, which is always set by the calling BASH).
39845      if test "xGNM" != xBASH; then
39846        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39847$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39848      fi
39849      # Try to locate tool using the code snippet
39850      for ac_prog in gnm
39851do
39852  # Extract the first word of "$ac_prog", so it can be a program name with args.
39853set dummy $ac_prog; ac_word=$2
39854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39855$as_echo_n "checking for $ac_word... " >&6; }
39856if ${ac_cv_path_GNM+:} false; then :
39857  $as_echo_n "(cached) " >&6
39858else
39859  case $GNM in
39860  [\\/]* | ?:[\\/]*)
39861  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39862  ;;
39863  *)
39864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39865for as_dir in $PATH
39866do
39867  IFS=$as_save_IFS
39868  test -z "$as_dir" && as_dir=.
39869    for ac_exec_ext in '' $ac_executable_extensions; do
39870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39871    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39873    break 2
39874  fi
39875done
39876  done
39877IFS=$as_save_IFS
39878
39879  ;;
39880esac
39881fi
39882GNM=$ac_cv_path_GNM
39883if test -n "$GNM"; then
39884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39885$as_echo "$GNM" >&6; }
39886else
39887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39888$as_echo "no" >&6; }
39889fi
39890
39891
39892  test -n "$GNM" && break
39893done
39894
39895    else
39896      # If it succeeded, then it was overridden by the user. We will use it
39897      # for the tool.
39898
39899      # First remove it from the list of overridden variables, so we can test
39900      # for unknown variables in the end.
39901      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39902
39903      # Check if we try to supply an empty value
39904      if test "x$GNM" = x; then
39905        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39906$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39908$as_echo_n "checking for GNM... " >&6; }
39909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39910$as_echo "disabled" >&6; }
39911      else
39912        # Check if the provided tool contains a complete path.
39913        tool_specified="$GNM"
39914        tool_basename="${tool_specified##*/}"
39915        if test "x$tool_basename" = "x$tool_specified"; then
39916          # A command without a complete path is provided, search $PATH.
39917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39918$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39919          # Extract the first word of "$tool_basename", so it can be a program name with args.
39920set dummy $tool_basename; ac_word=$2
39921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39922$as_echo_n "checking for $ac_word... " >&6; }
39923if ${ac_cv_path_GNM+:} false; then :
39924  $as_echo_n "(cached) " >&6
39925else
39926  case $GNM in
39927  [\\/]* | ?:[\\/]*)
39928  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39929  ;;
39930  *)
39931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39932for as_dir in $PATH
39933do
39934  IFS=$as_save_IFS
39935  test -z "$as_dir" && as_dir=.
39936    for ac_exec_ext in '' $ac_executable_extensions; do
39937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39938    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39940    break 2
39941  fi
39942done
39943  done
39944IFS=$as_save_IFS
39945
39946  ;;
39947esac
39948fi
39949GNM=$ac_cv_path_GNM
39950if test -n "$GNM"; then
39951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39952$as_echo "$GNM" >&6; }
39953else
39954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39955$as_echo "no" >&6; }
39956fi
39957
39958
39959          if test "x$GNM" = x; then
39960            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39961          fi
39962        else
39963          # Otherwise we believe it is a complete path. Use it as it is.
39964          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39965$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39966          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39967$as_echo_n "checking for GNM... " >&6; }
39968          if test ! -x "$tool_specified"; then
39969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39970$as_echo "not found" >&6; }
39971            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39972          fi
39973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39974$as_echo "$tool_specified" >&6; }
39975        fi
39976      fi
39977    fi
39978
39979  fi
39980
39981
39982
39983  # Only process if variable expands to non-empty
39984
39985  if test "x$GNM" != x; then
39986    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39987
39988  # First separate the path from the arguments. This will split at the first
39989  # space.
39990  complete="$GNM"
39991  path="${complete%% *}"
39992  tmp="$complete EOL"
39993  arguments="${tmp#* }"
39994
39995  # Input might be given as Windows format, start by converting to
39996  # unix format.
39997  new_path=`$CYGPATH -u "$path"`
39998
39999  # Now try to locate executable using which
40000  new_path=`$WHICH "$new_path" 2> /dev/null`
40001  # bat and cmd files are not always considered executable in cygwin causing which
40002  # to not find them
40003  if test "x$new_path" = x \
40004      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40005      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40006    new_path=`$CYGPATH -u "$path"`
40007  fi
40008  if test "x$new_path" = x; then
40009    # Oops. Which didn't find the executable.
40010    # The splitting of arguments from the executable at a space might have been incorrect,
40011    # since paths with space are more likely in Windows. Give it another try with the whole
40012    # argument.
40013    path="$complete"
40014    arguments="EOL"
40015    new_path=`$CYGPATH -u "$path"`
40016    new_path=`$WHICH "$new_path" 2> /dev/null`
40017    # bat and cmd files are not always considered executable in cygwin causing which
40018    # to not find them
40019    if test "x$new_path" = x \
40020        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40021        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40022      new_path=`$CYGPATH -u "$path"`
40023    fi
40024    if test "x$new_path" = x; then
40025      # It's still not found. Now this is an unrecoverable error.
40026      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40027$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40028      has_space=`$ECHO "$complete" | $GREP " "`
40029      if test "x$has_space" != x; then
40030        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40031$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40032      fi
40033      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40034    fi
40035  fi
40036
40037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40040  # "foo.exe" is OK but "foo" is an error.
40041  #
40042  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40043  # It is also a way to make sure we got the proper file name for the real test later on.
40044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40045  if test "x$test_shortpath" = x; then
40046    # Short path failed, file does not exist as specified.
40047    # Try adding .exe or .cmd
40048    if test -f "${new_path}.exe"; then
40049      input_to_shortpath="${new_path}.exe"
40050    elif test -f "${new_path}.cmd"; then
40051      input_to_shortpath="${new_path}.cmd"
40052    else
40053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40054$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40055      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40056$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40057      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40058    fi
40059  else
40060    input_to_shortpath="$new_path"
40061  fi
40062
40063  # Call helper function which possibly converts this using DOS-style short mode.
40064  # If so, the updated path is stored in $new_path.
40065  new_path="$input_to_shortpath"
40066
40067  input_path="$input_to_shortpath"
40068  # Check if we need to convert this using DOS-style short mode. If the path
40069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40070  # take no chances and rewrite it.
40071  # Note: m4 eats our [], so we need to use [ and ] instead.
40072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40073  if test "x$has_forbidden_chars" != x; then
40074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40078      # Going to short mode and back again did indeed matter. Since short mode is
40079      # case insensitive, let's make it lowercase to improve readability.
40080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40081      # Now convert it back to Unix-style (cygpath)
40082      input_path=`$CYGPATH -u "$shortmode_path"`
40083      new_path="$input_path"
40084    fi
40085  fi
40086
40087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40088  if test "x$test_cygdrive_prefix" = x; then
40089    # As a simple fix, exclude /usr/bin since it's not a real path.
40090    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40092      # a path prefixed by /cygdrive for fixpath to work.
40093      new_path="$CYGWIN_ROOT_PATH$input_path"
40094    fi
40095  fi
40096
40097  # remove trailing .exe if any
40098  new_path="${new_path/%.exe/}"
40099
40100    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40101
40102  # First separate the path from the arguments. This will split at the first
40103  # space.
40104  complete="$GNM"
40105  path="${complete%% *}"
40106  tmp="$complete EOL"
40107  arguments="${tmp#* }"
40108
40109  # Input might be given as Windows format, start by converting to
40110  # unix format.
40111  new_path="$path"
40112
40113  windows_path="$new_path"
40114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40115    unix_path=`$CYGPATH -u "$windows_path"`
40116    new_path="$unix_path"
40117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40119    new_path="$unix_path"
40120  fi
40121
40122
40123  # Now try to locate executable using which
40124  new_path=`$WHICH "$new_path" 2> /dev/null`
40125
40126  if test "x$new_path" = x; then
40127    # Oops. Which didn't find the executable.
40128    # The splitting of arguments from the executable at a space might have been incorrect,
40129    # since paths with space are more likely in Windows. Give it another try with the whole
40130    # argument.
40131    path="$complete"
40132    arguments="EOL"
40133    new_path="$path"
40134
40135  windows_path="$new_path"
40136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40137    unix_path=`$CYGPATH -u "$windows_path"`
40138    new_path="$unix_path"
40139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40141    new_path="$unix_path"
40142  fi
40143
40144
40145    new_path=`$WHICH "$new_path" 2> /dev/null`
40146    # bat and cmd files are not always considered executable in MSYS causing which
40147    # to not find them
40148    if test "x$new_path" = x \
40149        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40150        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40151      new_path="$path"
40152
40153  windows_path="$new_path"
40154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40155    unix_path=`$CYGPATH -u "$windows_path"`
40156    new_path="$unix_path"
40157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40159    new_path="$unix_path"
40160  fi
40161
40162    fi
40163
40164    if test "x$new_path" = x; then
40165      # It's still not found. Now this is an unrecoverable error.
40166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40167$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40168      has_space=`$ECHO "$complete" | $GREP " "`
40169      if test "x$has_space" != x; then
40170        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40171$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40172      fi
40173      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40174    fi
40175  fi
40176
40177  # Now new_path has a complete unix path to the binary
40178  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40179    # Keep paths in /bin as-is, but remove trailing .exe if any
40180    new_path="${new_path/%.exe/}"
40181    # Do not save /bin paths to all_fixpath_prefixes!
40182  else
40183    # Not in mixed or Windows style, start by that.
40184    new_path=`cmd //c echo $new_path`
40185
40186  input_path="$new_path"
40187  # Check if we need to convert this using DOS-style short mode. If the path
40188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40189  # take no chances and rewrite it.
40190  # Note: m4 eats our [], so we need to use [ and ] instead.
40191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40192  if test "x$has_forbidden_chars" != x; then
40193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40195  fi
40196
40197    # Output is in $new_path
40198
40199  windows_path="$new_path"
40200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40201    unix_path=`$CYGPATH -u "$windows_path"`
40202    new_path="$unix_path"
40203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40205    new_path="$unix_path"
40206  fi
40207
40208    # remove trailing .exe if any
40209    new_path="${new_path/%.exe/}"
40210
40211    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40212    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40213  fi
40214
40215    else
40216      # We're on a unix platform. Hooray! :)
40217      # First separate the path from the arguments. This will split at the first
40218      # space.
40219      complete="$GNM"
40220      path="${complete%% *}"
40221      tmp="$complete EOL"
40222      arguments="${tmp#* }"
40223
40224      # Cannot rely on the command "which" here since it doesn't always work.
40225      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40226      if test -z "$is_absolute_path"; then
40227        # Path to executable is not absolute. Find it.
40228        IFS_save="$IFS"
40229        IFS=:
40230        for p in $PATH; do
40231          if test -f "$p/$path" && test -x "$p/$path"; then
40232            new_path="$p/$path"
40233            break
40234          fi
40235        done
40236        IFS="$IFS_save"
40237      else
40238        # This is an absolute path, we can use it without further modifications.
40239        new_path="$path"
40240      fi
40241
40242      if test "x$new_path" = x; then
40243        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40244$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40245        has_space=`$ECHO "$complete" | $GREP " "`
40246        if test "x$has_space" != x; then
40247          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40248$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40249        fi
40250        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40251      fi
40252    fi
40253
40254    # Now join together the path and the arguments once again
40255    if test "x$arguments" != xEOL; then
40256      new_complete="$new_path ${arguments% *}"
40257    else
40258      new_complete="$new_path"
40259    fi
40260
40261    if test "x$complete" != "x$new_complete"; then
40262      GNM="$new_complete"
40263      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40264$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40265    fi
40266  fi
40267
40268  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40269    # FIXME: we should unify this with the solaris case above.
40270
40271
40272  # Publish this variable in the help.
40273
40274
40275  if [ -z "${STRIP+x}" ]; then
40276    # The variable is not set by user, try to locate tool using the code snippet
40277    if test -n "$ac_tool_prefix"; then
40278  for ac_prog in strip
40279  do
40280    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40281set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40283$as_echo_n "checking for $ac_word... " >&6; }
40284if ${ac_cv_prog_STRIP+:} false; then :
40285  $as_echo_n "(cached) " >&6
40286else
40287  if test -n "$STRIP"; then
40288  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40289else
40290as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40291for as_dir in $PATH
40292do
40293  IFS=$as_save_IFS
40294  test -z "$as_dir" && as_dir=.
40295    for ac_exec_ext in '' $ac_executable_extensions; do
40296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40297    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40299    break 2
40300  fi
40301done
40302  done
40303IFS=$as_save_IFS
40304
40305fi
40306fi
40307STRIP=$ac_cv_prog_STRIP
40308if test -n "$STRIP"; then
40309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40310$as_echo "$STRIP" >&6; }
40311else
40312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40313$as_echo "no" >&6; }
40314fi
40315
40316
40317    test -n "$STRIP" && break
40318  done
40319fi
40320if test -z "$STRIP"; then
40321  ac_ct_STRIP=$STRIP
40322  for ac_prog in strip
40323do
40324  # Extract the first word of "$ac_prog", so it can be a program name with args.
40325set dummy $ac_prog; ac_word=$2
40326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40327$as_echo_n "checking for $ac_word... " >&6; }
40328if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40329  $as_echo_n "(cached) " >&6
40330else
40331  if test -n "$ac_ct_STRIP"; then
40332  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40333else
40334as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40335for as_dir in $PATH
40336do
40337  IFS=$as_save_IFS
40338  test -z "$as_dir" && as_dir=.
40339    for ac_exec_ext in '' $ac_executable_extensions; do
40340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40341    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40343    break 2
40344  fi
40345done
40346  done
40347IFS=$as_save_IFS
40348
40349fi
40350fi
40351ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40352if test -n "$ac_ct_STRIP"; then
40353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40354$as_echo "$ac_ct_STRIP" >&6; }
40355else
40356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40357$as_echo "no" >&6; }
40358fi
40359
40360
40361  test -n "$ac_ct_STRIP" && break
40362done
40363
40364  if test "x$ac_ct_STRIP" = x; then
40365    STRIP=""
40366  else
40367    case $cross_compiling:$ac_tool_warned in
40368yes:)
40369{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40370$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40371ac_tool_warned=yes ;;
40372esac
40373    STRIP=$ac_ct_STRIP
40374  fi
40375fi
40376
40377  else
40378    # The variable is set, but is it from the command line or the environment?
40379
40380    # Try to remove the string !STRIP! from our list.
40381    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40382    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40383      # If it failed, the variable was not from the command line. Ignore it,
40384      # but warn the user (except for BASH, which is always set by the calling BASH).
40385      if test "xSTRIP" != xBASH; then
40386        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40387$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40388      fi
40389      # Try to locate tool using the code snippet
40390      if test -n "$ac_tool_prefix"; then
40391  for ac_prog in strip
40392  do
40393    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40394set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40396$as_echo_n "checking for $ac_word... " >&6; }
40397if ${ac_cv_prog_STRIP+:} false; then :
40398  $as_echo_n "(cached) " >&6
40399else
40400  if test -n "$STRIP"; then
40401  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40402else
40403as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40404for as_dir in $PATH
40405do
40406  IFS=$as_save_IFS
40407  test -z "$as_dir" && as_dir=.
40408    for ac_exec_ext in '' $ac_executable_extensions; do
40409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40410    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40412    break 2
40413  fi
40414done
40415  done
40416IFS=$as_save_IFS
40417
40418fi
40419fi
40420STRIP=$ac_cv_prog_STRIP
40421if test -n "$STRIP"; then
40422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40423$as_echo "$STRIP" >&6; }
40424else
40425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40426$as_echo "no" >&6; }
40427fi
40428
40429
40430    test -n "$STRIP" && break
40431  done
40432fi
40433if test -z "$STRIP"; then
40434  ac_ct_STRIP=$STRIP
40435  for ac_prog in strip
40436do
40437  # Extract the first word of "$ac_prog", so it can be a program name with args.
40438set dummy $ac_prog; ac_word=$2
40439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40440$as_echo_n "checking for $ac_word... " >&6; }
40441if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40442  $as_echo_n "(cached) " >&6
40443else
40444  if test -n "$ac_ct_STRIP"; then
40445  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40446else
40447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40448for as_dir in $PATH
40449do
40450  IFS=$as_save_IFS
40451  test -z "$as_dir" && as_dir=.
40452    for ac_exec_ext in '' $ac_executable_extensions; do
40453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40454    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40456    break 2
40457  fi
40458done
40459  done
40460IFS=$as_save_IFS
40461
40462fi
40463fi
40464ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40465if test -n "$ac_ct_STRIP"; then
40466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40467$as_echo "$ac_ct_STRIP" >&6; }
40468else
40469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40470$as_echo "no" >&6; }
40471fi
40472
40473
40474  test -n "$ac_ct_STRIP" && break
40475done
40476
40477  if test "x$ac_ct_STRIP" = x; then
40478    STRIP=""
40479  else
40480    case $cross_compiling:$ac_tool_warned in
40481yes:)
40482{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40483$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40484ac_tool_warned=yes ;;
40485esac
40486    STRIP=$ac_ct_STRIP
40487  fi
40488fi
40489
40490    else
40491      # If it succeeded, then it was overridden by the user. We will use it
40492      # for the tool.
40493
40494      # First remove it from the list of overridden variables, so we can test
40495      # for unknown variables in the end.
40496      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40497
40498      # Check if we try to supply an empty value
40499      if test "x$STRIP" = x; then
40500        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40501$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40503$as_echo_n "checking for STRIP... " >&6; }
40504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40505$as_echo "disabled" >&6; }
40506      else
40507        # Check if the provided tool contains a complete path.
40508        tool_specified="$STRIP"
40509        tool_basename="${tool_specified##*/}"
40510        if test "x$tool_basename" = "x$tool_specified"; then
40511          # A command without a complete path is provided, search $PATH.
40512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40513$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40514          # Extract the first word of "$tool_basename", so it can be a program name with args.
40515set dummy $tool_basename; ac_word=$2
40516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40517$as_echo_n "checking for $ac_word... " >&6; }
40518if ${ac_cv_path_STRIP+:} false; then :
40519  $as_echo_n "(cached) " >&6
40520else
40521  case $STRIP in
40522  [\\/]* | ?:[\\/]*)
40523  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40524  ;;
40525  *)
40526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40527for as_dir in $PATH
40528do
40529  IFS=$as_save_IFS
40530  test -z "$as_dir" && as_dir=.
40531    for ac_exec_ext in '' $ac_executable_extensions; do
40532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40533    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40535    break 2
40536  fi
40537done
40538  done
40539IFS=$as_save_IFS
40540
40541  ;;
40542esac
40543fi
40544STRIP=$ac_cv_path_STRIP
40545if test -n "$STRIP"; then
40546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40547$as_echo "$STRIP" >&6; }
40548else
40549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40550$as_echo "no" >&6; }
40551fi
40552
40553
40554          if test "x$STRIP" = x; then
40555            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40556          fi
40557        else
40558          # Otherwise we believe it is a complete path. Use it as it is.
40559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40560$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40561          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40562$as_echo_n "checking for STRIP... " >&6; }
40563          if test ! -x "$tool_specified"; then
40564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40565$as_echo "not found" >&6; }
40566            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40567          fi
40568          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40569$as_echo "$tool_specified" >&6; }
40570        fi
40571      fi
40572    fi
40573
40574  fi
40575
40576
40577
40578  # Only process if variable expands to non-empty
40579
40580  if test "x$STRIP" != x; then
40581    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40582
40583  # First separate the path from the arguments. This will split at the first
40584  # space.
40585  complete="$STRIP"
40586  path="${complete%% *}"
40587  tmp="$complete EOL"
40588  arguments="${tmp#* }"
40589
40590  # Input might be given as Windows format, start by converting to
40591  # unix format.
40592  new_path=`$CYGPATH -u "$path"`
40593
40594  # Now try to locate executable using which
40595  new_path=`$WHICH "$new_path" 2> /dev/null`
40596  # bat and cmd files are not always considered executable in cygwin causing which
40597  # to not find them
40598  if test "x$new_path" = x \
40599      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40600      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40601    new_path=`$CYGPATH -u "$path"`
40602  fi
40603  if test "x$new_path" = x; then
40604    # Oops. Which didn't find the executable.
40605    # The splitting of arguments from the executable at a space might have been incorrect,
40606    # since paths with space are more likely in Windows. Give it another try with the whole
40607    # argument.
40608    path="$complete"
40609    arguments="EOL"
40610    new_path=`$CYGPATH -u "$path"`
40611    new_path=`$WHICH "$new_path" 2> /dev/null`
40612    # bat and cmd files are not always considered executable in cygwin causing which
40613    # to not find them
40614    if test "x$new_path" = x \
40615        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40616        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40617      new_path=`$CYGPATH -u "$path"`
40618    fi
40619    if test "x$new_path" = x; then
40620      # It's still not found. Now this is an unrecoverable error.
40621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40622$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40623      has_space=`$ECHO "$complete" | $GREP " "`
40624      if test "x$has_space" != x; then
40625        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40626$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40627      fi
40628      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40629    fi
40630  fi
40631
40632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40635  # "foo.exe" is OK but "foo" is an error.
40636  #
40637  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40638  # It is also a way to make sure we got the proper file name for the real test later on.
40639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40640  if test "x$test_shortpath" = x; then
40641    # Short path failed, file does not exist as specified.
40642    # Try adding .exe or .cmd
40643    if test -f "${new_path}.exe"; then
40644      input_to_shortpath="${new_path}.exe"
40645    elif test -f "${new_path}.cmd"; then
40646      input_to_shortpath="${new_path}.cmd"
40647    else
40648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40649$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40650      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40651$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40652      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40653    fi
40654  else
40655    input_to_shortpath="$new_path"
40656  fi
40657
40658  # Call helper function which possibly converts this using DOS-style short mode.
40659  # If so, the updated path is stored in $new_path.
40660  new_path="$input_to_shortpath"
40661
40662  input_path="$input_to_shortpath"
40663  # Check if we need to convert this using DOS-style short mode. If the path
40664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40665  # take no chances and rewrite it.
40666  # Note: m4 eats our [], so we need to use [ and ] instead.
40667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40668  if test "x$has_forbidden_chars" != x; then
40669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40673      # Going to short mode and back again did indeed matter. Since short mode is
40674      # case insensitive, let's make it lowercase to improve readability.
40675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40676      # Now convert it back to Unix-style (cygpath)
40677      input_path=`$CYGPATH -u "$shortmode_path"`
40678      new_path="$input_path"
40679    fi
40680  fi
40681
40682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40683  if test "x$test_cygdrive_prefix" = x; then
40684    # As a simple fix, exclude /usr/bin since it's not a real path.
40685    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40687      # a path prefixed by /cygdrive for fixpath to work.
40688      new_path="$CYGWIN_ROOT_PATH$input_path"
40689    fi
40690  fi
40691
40692  # remove trailing .exe if any
40693  new_path="${new_path/%.exe/}"
40694
40695    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40696
40697  # First separate the path from the arguments. This will split at the first
40698  # space.
40699  complete="$STRIP"
40700  path="${complete%% *}"
40701  tmp="$complete EOL"
40702  arguments="${tmp#* }"
40703
40704  # Input might be given as Windows format, start by converting to
40705  # unix format.
40706  new_path="$path"
40707
40708  windows_path="$new_path"
40709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40710    unix_path=`$CYGPATH -u "$windows_path"`
40711    new_path="$unix_path"
40712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40714    new_path="$unix_path"
40715  fi
40716
40717
40718  # Now try to locate executable using which
40719  new_path=`$WHICH "$new_path" 2> /dev/null`
40720
40721  if test "x$new_path" = x; then
40722    # Oops. Which didn't find the executable.
40723    # The splitting of arguments from the executable at a space might have been incorrect,
40724    # since paths with space are more likely in Windows. Give it another try with the whole
40725    # argument.
40726    path="$complete"
40727    arguments="EOL"
40728    new_path="$path"
40729
40730  windows_path="$new_path"
40731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40732    unix_path=`$CYGPATH -u "$windows_path"`
40733    new_path="$unix_path"
40734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40736    new_path="$unix_path"
40737  fi
40738
40739
40740    new_path=`$WHICH "$new_path" 2> /dev/null`
40741    # bat and cmd files are not always considered executable in MSYS causing which
40742    # to not find them
40743    if test "x$new_path" = x \
40744        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40745        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40746      new_path="$path"
40747
40748  windows_path="$new_path"
40749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40750    unix_path=`$CYGPATH -u "$windows_path"`
40751    new_path="$unix_path"
40752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40754    new_path="$unix_path"
40755  fi
40756
40757    fi
40758
40759    if test "x$new_path" = x; then
40760      # It's still not found. Now this is an unrecoverable error.
40761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40762$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40763      has_space=`$ECHO "$complete" | $GREP " "`
40764      if test "x$has_space" != x; then
40765        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40766$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40767      fi
40768      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40769    fi
40770  fi
40771
40772  # Now new_path has a complete unix path to the binary
40773  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40774    # Keep paths in /bin as-is, but remove trailing .exe if any
40775    new_path="${new_path/%.exe/}"
40776    # Do not save /bin paths to all_fixpath_prefixes!
40777  else
40778    # Not in mixed or Windows style, start by that.
40779    new_path=`cmd //c echo $new_path`
40780
40781  input_path="$new_path"
40782  # Check if we need to convert this using DOS-style short mode. If the path
40783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40784  # take no chances and rewrite it.
40785  # Note: m4 eats our [], so we need to use [ and ] instead.
40786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40787  if test "x$has_forbidden_chars" != x; then
40788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40790  fi
40791
40792    # Output is in $new_path
40793
40794  windows_path="$new_path"
40795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40796    unix_path=`$CYGPATH -u "$windows_path"`
40797    new_path="$unix_path"
40798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40800    new_path="$unix_path"
40801  fi
40802
40803    # remove trailing .exe if any
40804    new_path="${new_path/%.exe/}"
40805
40806    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40807    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40808  fi
40809
40810    else
40811      # We're on a unix platform. Hooray! :)
40812      # First separate the path from the arguments. This will split at the first
40813      # space.
40814      complete="$STRIP"
40815      path="${complete%% *}"
40816      tmp="$complete EOL"
40817      arguments="${tmp#* }"
40818
40819      # Cannot rely on the command "which" here since it doesn't always work.
40820      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40821      if test -z "$is_absolute_path"; then
40822        # Path to executable is not absolute. Find it.
40823        IFS_save="$IFS"
40824        IFS=:
40825        for p in $PATH; do
40826          if test -f "$p/$path" && test -x "$p/$path"; then
40827            new_path="$p/$path"
40828            break
40829          fi
40830        done
40831        IFS="$IFS_save"
40832      else
40833        # This is an absolute path, we can use it without further modifications.
40834        new_path="$path"
40835      fi
40836
40837      if test "x$new_path" = x; then
40838        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40839$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40840        has_space=`$ECHO "$complete" | $GREP " "`
40841        if test "x$has_space" != x; then
40842          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40843$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40844        fi
40845        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40846      fi
40847    fi
40848
40849    # Now join together the path and the arguments once again
40850    if test "x$arguments" != xEOL; then
40851      new_complete="$new_path ${arguments% *}"
40852    else
40853      new_complete="$new_path"
40854    fi
40855
40856    if test "x$complete" != "x$new_complete"; then
40857      STRIP="$new_complete"
40858      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40859$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40860    fi
40861  fi
40862
40863    if test "x$TOOLCHAIN_TYPE" = xgcc; then
40864
40865
40866  # Publish this variable in the help.
40867
40868
40869  if [ -z "${NM+x}" ]; then
40870    # The variable is not set by user, try to locate tool using the code snippet
40871    if test -n "$ac_tool_prefix"; then
40872  for ac_prog in nm gcc-nm
40873  do
40874    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40875set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40877$as_echo_n "checking for $ac_word... " >&6; }
40878if ${ac_cv_prog_NM+:} false; then :
40879  $as_echo_n "(cached) " >&6
40880else
40881  if test -n "$NM"; then
40882  ac_cv_prog_NM="$NM" # Let the user override the test.
40883else
40884as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40885for as_dir in $PATH
40886do
40887  IFS=$as_save_IFS
40888  test -z "$as_dir" && as_dir=.
40889    for ac_exec_ext in '' $ac_executable_extensions; do
40890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40891    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40893    break 2
40894  fi
40895done
40896  done
40897IFS=$as_save_IFS
40898
40899fi
40900fi
40901NM=$ac_cv_prog_NM
40902if test -n "$NM"; then
40903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40904$as_echo "$NM" >&6; }
40905else
40906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40907$as_echo "no" >&6; }
40908fi
40909
40910
40911    test -n "$NM" && break
40912  done
40913fi
40914if test -z "$NM"; then
40915  ac_ct_NM=$NM
40916  for ac_prog in nm gcc-nm
40917do
40918  # Extract the first word of "$ac_prog", so it can be a program name with args.
40919set dummy $ac_prog; ac_word=$2
40920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40921$as_echo_n "checking for $ac_word... " >&6; }
40922if ${ac_cv_prog_ac_ct_NM+:} false; then :
40923  $as_echo_n "(cached) " >&6
40924else
40925  if test -n "$ac_ct_NM"; then
40926  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40927else
40928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40929for as_dir in $PATH
40930do
40931  IFS=$as_save_IFS
40932  test -z "$as_dir" && as_dir=.
40933    for ac_exec_ext in '' $ac_executable_extensions; do
40934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40935    ac_cv_prog_ac_ct_NM="$ac_prog"
40936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40937    break 2
40938  fi
40939done
40940  done
40941IFS=$as_save_IFS
40942
40943fi
40944fi
40945ac_ct_NM=$ac_cv_prog_ac_ct_NM
40946if test -n "$ac_ct_NM"; then
40947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40948$as_echo "$ac_ct_NM" >&6; }
40949else
40950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40951$as_echo "no" >&6; }
40952fi
40953
40954
40955  test -n "$ac_ct_NM" && break
40956done
40957
40958  if test "x$ac_ct_NM" = x; then
40959    NM=""
40960  else
40961    case $cross_compiling:$ac_tool_warned in
40962yes:)
40963{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40964$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40965ac_tool_warned=yes ;;
40966esac
40967    NM=$ac_ct_NM
40968  fi
40969fi
40970
40971  else
40972    # The variable is set, but is it from the command line or the environment?
40973
40974    # Try to remove the string !NM! from our list.
40975    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40976    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40977      # If it failed, the variable was not from the command line. Ignore it,
40978      # but warn the user (except for BASH, which is always set by the calling BASH).
40979      if test "xNM" != xBASH; then
40980        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40981$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40982      fi
40983      # Try to locate tool using the code snippet
40984      if test -n "$ac_tool_prefix"; then
40985  for ac_prog in nm gcc-nm
40986  do
40987    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40988set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40990$as_echo_n "checking for $ac_word... " >&6; }
40991if ${ac_cv_prog_NM+:} false; then :
40992  $as_echo_n "(cached) " >&6
40993else
40994  if test -n "$NM"; then
40995  ac_cv_prog_NM="$NM" # Let the user override the test.
40996else
40997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40998for as_dir in $PATH
40999do
41000  IFS=$as_save_IFS
41001  test -z "$as_dir" && as_dir=.
41002    for ac_exec_ext in '' $ac_executable_extensions; do
41003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41004    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41006    break 2
41007  fi
41008done
41009  done
41010IFS=$as_save_IFS
41011
41012fi
41013fi
41014NM=$ac_cv_prog_NM
41015if test -n "$NM"; then
41016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41017$as_echo "$NM" >&6; }
41018else
41019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41020$as_echo "no" >&6; }
41021fi
41022
41023
41024    test -n "$NM" && break
41025  done
41026fi
41027if test -z "$NM"; then
41028  ac_ct_NM=$NM
41029  for ac_prog in nm gcc-nm
41030do
41031  # Extract the first word of "$ac_prog", so it can be a program name with args.
41032set dummy $ac_prog; ac_word=$2
41033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41034$as_echo_n "checking for $ac_word... " >&6; }
41035if ${ac_cv_prog_ac_ct_NM+:} false; then :
41036  $as_echo_n "(cached) " >&6
41037else
41038  if test -n "$ac_ct_NM"; then
41039  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41040else
41041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41042for as_dir in $PATH
41043do
41044  IFS=$as_save_IFS
41045  test -z "$as_dir" && as_dir=.
41046    for ac_exec_ext in '' $ac_executable_extensions; do
41047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41048    ac_cv_prog_ac_ct_NM="$ac_prog"
41049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41050    break 2
41051  fi
41052done
41053  done
41054IFS=$as_save_IFS
41055
41056fi
41057fi
41058ac_ct_NM=$ac_cv_prog_ac_ct_NM
41059if test -n "$ac_ct_NM"; then
41060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41061$as_echo "$ac_ct_NM" >&6; }
41062else
41063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41064$as_echo "no" >&6; }
41065fi
41066
41067
41068  test -n "$ac_ct_NM" && break
41069done
41070
41071  if test "x$ac_ct_NM" = x; then
41072    NM=""
41073  else
41074    case $cross_compiling:$ac_tool_warned in
41075yes:)
41076{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41077$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41078ac_tool_warned=yes ;;
41079esac
41080    NM=$ac_ct_NM
41081  fi
41082fi
41083
41084    else
41085      # If it succeeded, then it was overridden by the user. We will use it
41086      # for the tool.
41087
41088      # First remove it from the list of overridden variables, so we can test
41089      # for unknown variables in the end.
41090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41091
41092      # Check if we try to supply an empty value
41093      if test "x$NM" = x; then
41094        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41095$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41096        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41097$as_echo_n "checking for NM... " >&6; }
41098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41099$as_echo "disabled" >&6; }
41100      else
41101        # Check if the provided tool contains a complete path.
41102        tool_specified="$NM"
41103        tool_basename="${tool_specified##*/}"
41104        if test "x$tool_basename" = "x$tool_specified"; then
41105          # A command without a complete path is provided, search $PATH.
41106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41107$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41108          # Extract the first word of "$tool_basename", so it can be a program name with args.
41109set dummy $tool_basename; ac_word=$2
41110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41111$as_echo_n "checking for $ac_word... " >&6; }
41112if ${ac_cv_path_NM+:} false; then :
41113  $as_echo_n "(cached) " >&6
41114else
41115  case $NM in
41116  [\\/]* | ?:[\\/]*)
41117  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41118  ;;
41119  *)
41120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41121for as_dir in $PATH
41122do
41123  IFS=$as_save_IFS
41124  test -z "$as_dir" && as_dir=.
41125    for ac_exec_ext in '' $ac_executable_extensions; do
41126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41127    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41129    break 2
41130  fi
41131done
41132  done
41133IFS=$as_save_IFS
41134
41135  ;;
41136esac
41137fi
41138NM=$ac_cv_path_NM
41139if test -n "$NM"; then
41140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41141$as_echo "$NM" >&6; }
41142else
41143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41144$as_echo "no" >&6; }
41145fi
41146
41147
41148          if test "x$NM" = x; then
41149            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41150          fi
41151        else
41152          # Otherwise we believe it is a complete path. Use it as it is.
41153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41154$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41155          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41156$as_echo_n "checking for NM... " >&6; }
41157          if test ! -x "$tool_specified"; then
41158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41159$as_echo "not found" >&6; }
41160            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41161          fi
41162          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41163$as_echo "$tool_specified" >&6; }
41164        fi
41165      fi
41166    fi
41167
41168  fi
41169
41170
41171    else
41172
41173
41174  # Publish this variable in the help.
41175
41176
41177  if [ -z "${NM+x}" ]; then
41178    # The variable is not set by user, try to locate tool using the code snippet
41179    if test -n "$ac_tool_prefix"; then
41180  for ac_prog in nm
41181  do
41182    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41183set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41185$as_echo_n "checking for $ac_word... " >&6; }
41186if ${ac_cv_prog_NM+:} false; then :
41187  $as_echo_n "(cached) " >&6
41188else
41189  if test -n "$NM"; then
41190  ac_cv_prog_NM="$NM" # Let the user override the test.
41191else
41192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41193for as_dir in $PATH
41194do
41195  IFS=$as_save_IFS
41196  test -z "$as_dir" && as_dir=.
41197    for ac_exec_ext in '' $ac_executable_extensions; do
41198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41199    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41201    break 2
41202  fi
41203done
41204  done
41205IFS=$as_save_IFS
41206
41207fi
41208fi
41209NM=$ac_cv_prog_NM
41210if test -n "$NM"; then
41211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41212$as_echo "$NM" >&6; }
41213else
41214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41215$as_echo "no" >&6; }
41216fi
41217
41218
41219    test -n "$NM" && break
41220  done
41221fi
41222if test -z "$NM"; then
41223  ac_ct_NM=$NM
41224  for ac_prog in nm
41225do
41226  # Extract the first word of "$ac_prog", so it can be a program name with args.
41227set dummy $ac_prog; ac_word=$2
41228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41229$as_echo_n "checking for $ac_word... " >&6; }
41230if ${ac_cv_prog_ac_ct_NM+:} false; then :
41231  $as_echo_n "(cached) " >&6
41232else
41233  if test -n "$ac_ct_NM"; then
41234  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41235else
41236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41237for as_dir in $PATH
41238do
41239  IFS=$as_save_IFS
41240  test -z "$as_dir" && as_dir=.
41241    for ac_exec_ext in '' $ac_executable_extensions; do
41242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41243    ac_cv_prog_ac_ct_NM="$ac_prog"
41244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41245    break 2
41246  fi
41247done
41248  done
41249IFS=$as_save_IFS
41250
41251fi
41252fi
41253ac_ct_NM=$ac_cv_prog_ac_ct_NM
41254if test -n "$ac_ct_NM"; then
41255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41256$as_echo "$ac_ct_NM" >&6; }
41257else
41258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41259$as_echo "no" >&6; }
41260fi
41261
41262
41263  test -n "$ac_ct_NM" && break
41264done
41265
41266  if test "x$ac_ct_NM" = x; then
41267    NM=""
41268  else
41269    case $cross_compiling:$ac_tool_warned in
41270yes:)
41271{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41272$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41273ac_tool_warned=yes ;;
41274esac
41275    NM=$ac_ct_NM
41276  fi
41277fi
41278
41279  else
41280    # The variable is set, but is it from the command line or the environment?
41281
41282    # Try to remove the string !NM! from our list.
41283    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41284    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41285      # If it failed, the variable was not from the command line. Ignore it,
41286      # but warn the user (except for BASH, which is always set by the calling BASH).
41287      if test "xNM" != xBASH; then
41288        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41289$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41290      fi
41291      # Try to locate tool using the code snippet
41292      if test -n "$ac_tool_prefix"; then
41293  for ac_prog in nm
41294  do
41295    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41296set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41298$as_echo_n "checking for $ac_word... " >&6; }
41299if ${ac_cv_prog_NM+:} false; then :
41300  $as_echo_n "(cached) " >&6
41301else
41302  if test -n "$NM"; then
41303  ac_cv_prog_NM="$NM" # Let the user override the test.
41304else
41305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41306for as_dir in $PATH
41307do
41308  IFS=$as_save_IFS
41309  test -z "$as_dir" && as_dir=.
41310    for ac_exec_ext in '' $ac_executable_extensions; do
41311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41312    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41314    break 2
41315  fi
41316done
41317  done
41318IFS=$as_save_IFS
41319
41320fi
41321fi
41322NM=$ac_cv_prog_NM
41323if test -n "$NM"; then
41324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41325$as_echo "$NM" >&6; }
41326else
41327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41328$as_echo "no" >&6; }
41329fi
41330
41331
41332    test -n "$NM" && break
41333  done
41334fi
41335if test -z "$NM"; then
41336  ac_ct_NM=$NM
41337  for ac_prog in nm
41338do
41339  # Extract the first word of "$ac_prog", so it can be a program name with args.
41340set dummy $ac_prog; ac_word=$2
41341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41342$as_echo_n "checking for $ac_word... " >&6; }
41343if ${ac_cv_prog_ac_ct_NM+:} false; then :
41344  $as_echo_n "(cached) " >&6
41345else
41346  if test -n "$ac_ct_NM"; then
41347  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41348else
41349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41350for as_dir in $PATH
41351do
41352  IFS=$as_save_IFS
41353  test -z "$as_dir" && as_dir=.
41354    for ac_exec_ext in '' $ac_executable_extensions; do
41355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41356    ac_cv_prog_ac_ct_NM="$ac_prog"
41357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41358    break 2
41359  fi
41360done
41361  done
41362IFS=$as_save_IFS
41363
41364fi
41365fi
41366ac_ct_NM=$ac_cv_prog_ac_ct_NM
41367if test -n "$ac_ct_NM"; then
41368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41369$as_echo "$ac_ct_NM" >&6; }
41370else
41371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41372$as_echo "no" >&6; }
41373fi
41374
41375
41376  test -n "$ac_ct_NM" && break
41377done
41378
41379  if test "x$ac_ct_NM" = x; then
41380    NM=""
41381  else
41382    case $cross_compiling:$ac_tool_warned in
41383yes:)
41384{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41385$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41386ac_tool_warned=yes ;;
41387esac
41388    NM=$ac_ct_NM
41389  fi
41390fi
41391
41392    else
41393      # If it succeeded, then it was overridden by the user. We will use it
41394      # for the tool.
41395
41396      # First remove it from the list of overridden variables, so we can test
41397      # for unknown variables in the end.
41398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41399
41400      # Check if we try to supply an empty value
41401      if test "x$NM" = x; then
41402        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41403$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41405$as_echo_n "checking for NM... " >&6; }
41406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41407$as_echo "disabled" >&6; }
41408      else
41409        # Check if the provided tool contains a complete path.
41410        tool_specified="$NM"
41411        tool_basename="${tool_specified##*/}"
41412        if test "x$tool_basename" = "x$tool_specified"; then
41413          # A command without a complete path is provided, search $PATH.
41414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41415$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41416          # Extract the first word of "$tool_basename", so it can be a program name with args.
41417set dummy $tool_basename; ac_word=$2
41418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41419$as_echo_n "checking for $ac_word... " >&6; }
41420if ${ac_cv_path_NM+:} false; then :
41421  $as_echo_n "(cached) " >&6
41422else
41423  case $NM in
41424  [\\/]* | ?:[\\/]*)
41425  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41426  ;;
41427  *)
41428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41429for as_dir in $PATH
41430do
41431  IFS=$as_save_IFS
41432  test -z "$as_dir" && as_dir=.
41433    for ac_exec_ext in '' $ac_executable_extensions; do
41434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41435    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41437    break 2
41438  fi
41439done
41440  done
41441IFS=$as_save_IFS
41442
41443  ;;
41444esac
41445fi
41446NM=$ac_cv_path_NM
41447if test -n "$NM"; then
41448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41449$as_echo "$NM" >&6; }
41450else
41451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41452$as_echo "no" >&6; }
41453fi
41454
41455
41456          if test "x$NM" = x; then
41457            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41458          fi
41459        else
41460          # Otherwise we believe it is a complete path. Use it as it is.
41461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41462$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41463          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41464$as_echo_n "checking for NM... " >&6; }
41465          if test ! -x "$tool_specified"; then
41466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41467$as_echo "not found" >&6; }
41468            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41469          fi
41470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41471$as_echo "$tool_specified" >&6; }
41472        fi
41473      fi
41474    fi
41475
41476  fi
41477
41478
41479    fi
41480
41481  # Only process if variable expands to non-empty
41482
41483  if test "x$NM" != x; then
41484    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41485
41486  # First separate the path from the arguments. This will split at the first
41487  # space.
41488  complete="$NM"
41489  path="${complete%% *}"
41490  tmp="$complete EOL"
41491  arguments="${tmp#* }"
41492
41493  # Input might be given as Windows format, start by converting to
41494  # unix format.
41495  new_path=`$CYGPATH -u "$path"`
41496
41497  # Now try to locate executable using which
41498  new_path=`$WHICH "$new_path" 2> /dev/null`
41499  # bat and cmd files are not always considered executable in cygwin causing which
41500  # to not find them
41501  if test "x$new_path" = x \
41502      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41503      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41504    new_path=`$CYGPATH -u "$path"`
41505  fi
41506  if test "x$new_path" = x; then
41507    # Oops. Which didn't find the executable.
41508    # The splitting of arguments from the executable at a space might have been incorrect,
41509    # since paths with space are more likely in Windows. Give it another try with the whole
41510    # argument.
41511    path="$complete"
41512    arguments="EOL"
41513    new_path=`$CYGPATH -u "$path"`
41514    new_path=`$WHICH "$new_path" 2> /dev/null`
41515    # bat and cmd files are not always considered executable in cygwin causing which
41516    # to not find them
41517    if test "x$new_path" = x \
41518        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41519        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41520      new_path=`$CYGPATH -u "$path"`
41521    fi
41522    if test "x$new_path" = x; then
41523      # It's still not found. Now this is an unrecoverable error.
41524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41525$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41526      has_space=`$ECHO "$complete" | $GREP " "`
41527      if test "x$has_space" != x; then
41528        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41529$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41530      fi
41531      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41532    fi
41533  fi
41534
41535  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41536  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41537  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41538  # "foo.exe" is OK but "foo" is an error.
41539  #
41540  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41541  # It is also a way to make sure we got the proper file name for the real test later on.
41542  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41543  if test "x$test_shortpath" = x; then
41544    # Short path failed, file does not exist as specified.
41545    # Try adding .exe or .cmd
41546    if test -f "${new_path}.exe"; then
41547      input_to_shortpath="${new_path}.exe"
41548    elif test -f "${new_path}.cmd"; then
41549      input_to_shortpath="${new_path}.cmd"
41550    else
41551      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41552$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41553      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41554$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41555      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41556    fi
41557  else
41558    input_to_shortpath="$new_path"
41559  fi
41560
41561  # Call helper function which possibly converts this using DOS-style short mode.
41562  # If so, the updated path is stored in $new_path.
41563  new_path="$input_to_shortpath"
41564
41565  input_path="$input_to_shortpath"
41566  # Check if we need to convert this using DOS-style short mode. If the path
41567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41568  # take no chances and rewrite it.
41569  # Note: m4 eats our [], so we need to use [ and ] instead.
41570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41571  if test "x$has_forbidden_chars" != x; then
41572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41576      # Going to short mode and back again did indeed matter. Since short mode is
41577      # case insensitive, let's make it lowercase to improve readability.
41578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41579      # Now convert it back to Unix-style (cygpath)
41580      input_path=`$CYGPATH -u "$shortmode_path"`
41581      new_path="$input_path"
41582    fi
41583  fi
41584
41585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41586  if test "x$test_cygdrive_prefix" = x; then
41587    # As a simple fix, exclude /usr/bin since it's not a real path.
41588    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41590      # a path prefixed by /cygdrive for fixpath to work.
41591      new_path="$CYGWIN_ROOT_PATH$input_path"
41592    fi
41593  fi
41594
41595  # remove trailing .exe if any
41596  new_path="${new_path/%.exe/}"
41597
41598    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41599
41600  # First separate the path from the arguments. This will split at the first
41601  # space.
41602  complete="$NM"
41603  path="${complete%% *}"
41604  tmp="$complete EOL"
41605  arguments="${tmp#* }"
41606
41607  # Input might be given as Windows format, start by converting to
41608  # unix format.
41609  new_path="$path"
41610
41611  windows_path="$new_path"
41612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41613    unix_path=`$CYGPATH -u "$windows_path"`
41614    new_path="$unix_path"
41615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41617    new_path="$unix_path"
41618  fi
41619
41620
41621  # Now try to locate executable using which
41622  new_path=`$WHICH "$new_path" 2> /dev/null`
41623
41624  if test "x$new_path" = x; then
41625    # Oops. Which didn't find the executable.
41626    # The splitting of arguments from the executable at a space might have been incorrect,
41627    # since paths with space are more likely in Windows. Give it another try with the whole
41628    # argument.
41629    path="$complete"
41630    arguments="EOL"
41631    new_path="$path"
41632
41633  windows_path="$new_path"
41634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41635    unix_path=`$CYGPATH -u "$windows_path"`
41636    new_path="$unix_path"
41637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41639    new_path="$unix_path"
41640  fi
41641
41642
41643    new_path=`$WHICH "$new_path" 2> /dev/null`
41644    # bat and cmd files are not always considered executable in MSYS causing which
41645    # to not find them
41646    if test "x$new_path" = x \
41647        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41648        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41649      new_path="$path"
41650
41651  windows_path="$new_path"
41652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41653    unix_path=`$CYGPATH -u "$windows_path"`
41654    new_path="$unix_path"
41655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41657    new_path="$unix_path"
41658  fi
41659
41660    fi
41661
41662    if test "x$new_path" = x; then
41663      # It's still not found. Now this is an unrecoverable error.
41664      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41665$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41666      has_space=`$ECHO "$complete" | $GREP " "`
41667      if test "x$has_space" != x; then
41668        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41669$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41670      fi
41671      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41672    fi
41673  fi
41674
41675  # Now new_path has a complete unix path to the binary
41676  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41677    # Keep paths in /bin as-is, but remove trailing .exe if any
41678    new_path="${new_path/%.exe/}"
41679    # Do not save /bin paths to all_fixpath_prefixes!
41680  else
41681    # Not in mixed or Windows style, start by that.
41682    new_path=`cmd //c echo $new_path`
41683
41684  input_path="$new_path"
41685  # Check if we need to convert this using DOS-style short mode. If the path
41686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41687  # take no chances and rewrite it.
41688  # Note: m4 eats our [], so we need to use [ and ] instead.
41689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41690  if test "x$has_forbidden_chars" != x; then
41691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41692    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41693  fi
41694
41695    # Output is in $new_path
41696
41697  windows_path="$new_path"
41698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41699    unix_path=`$CYGPATH -u "$windows_path"`
41700    new_path="$unix_path"
41701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41703    new_path="$unix_path"
41704  fi
41705
41706    # remove trailing .exe if any
41707    new_path="${new_path/%.exe/}"
41708
41709    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41710    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41711  fi
41712
41713    else
41714      # We're on a unix platform. Hooray! :)
41715      # First separate the path from the arguments. This will split at the first
41716      # space.
41717      complete="$NM"
41718      path="${complete%% *}"
41719      tmp="$complete EOL"
41720      arguments="${tmp#* }"
41721
41722      # Cannot rely on the command "which" here since it doesn't always work.
41723      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41724      if test -z "$is_absolute_path"; then
41725        # Path to executable is not absolute. Find it.
41726        IFS_save="$IFS"
41727        IFS=:
41728        for p in $PATH; do
41729          if test -f "$p/$path" && test -x "$p/$path"; then
41730            new_path="$p/$path"
41731            break
41732          fi
41733        done
41734        IFS="$IFS_save"
41735      else
41736        # This is an absolute path, we can use it without further modifications.
41737        new_path="$path"
41738      fi
41739
41740      if test "x$new_path" = x; then
41741        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41742$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41743        has_space=`$ECHO "$complete" | $GREP " "`
41744        if test "x$has_space" != x; then
41745          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41746$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41747        fi
41748        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41749      fi
41750    fi
41751
41752    # Now join together the path and the arguments once again
41753    if test "x$arguments" != xEOL; then
41754      new_complete="$new_path ${arguments% *}"
41755    else
41756      new_complete="$new_path"
41757    fi
41758
41759    if test "x$complete" != "x$new_complete"; then
41760      NM="$new_complete"
41761      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41762$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41763    fi
41764  fi
41765
41766    GNM="$NM"
41767
41768  fi
41769
41770  # objcopy is used for moving debug symbols to separate files when
41771  # full debug symbols are enabled.
41772  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
41773
41774
41775  # Publish this variable in the help.
41776
41777
41778  if [ -z "${OBJCOPY+x}" ]; then
41779    # The variable is not set by user, try to locate tool using the code snippet
41780    if test -n "$ac_tool_prefix"; then
41781  for ac_prog in gobjcopy objcopy
41782  do
41783    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41784set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41786$as_echo_n "checking for $ac_word... " >&6; }
41787if ${ac_cv_prog_OBJCOPY+:} false; then :
41788  $as_echo_n "(cached) " >&6
41789else
41790  if test -n "$OBJCOPY"; then
41791  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41792else
41793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41794for as_dir in $PATH
41795do
41796  IFS=$as_save_IFS
41797  test -z "$as_dir" && as_dir=.
41798    for ac_exec_ext in '' $ac_executable_extensions; do
41799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41800    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41802    break 2
41803  fi
41804done
41805  done
41806IFS=$as_save_IFS
41807
41808fi
41809fi
41810OBJCOPY=$ac_cv_prog_OBJCOPY
41811if test -n "$OBJCOPY"; then
41812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41813$as_echo "$OBJCOPY" >&6; }
41814else
41815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41816$as_echo "no" >&6; }
41817fi
41818
41819
41820    test -n "$OBJCOPY" && break
41821  done
41822fi
41823if test -z "$OBJCOPY"; then
41824  ac_ct_OBJCOPY=$OBJCOPY
41825  for ac_prog in gobjcopy objcopy
41826do
41827  # Extract the first word of "$ac_prog", so it can be a program name with args.
41828set dummy $ac_prog; ac_word=$2
41829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41830$as_echo_n "checking for $ac_word... " >&6; }
41831if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41832  $as_echo_n "(cached) " >&6
41833else
41834  if test -n "$ac_ct_OBJCOPY"; then
41835  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41836else
41837as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41838for as_dir in $PATH
41839do
41840  IFS=$as_save_IFS
41841  test -z "$as_dir" && as_dir=.
41842    for ac_exec_ext in '' $ac_executable_extensions; do
41843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41844    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41846    break 2
41847  fi
41848done
41849  done
41850IFS=$as_save_IFS
41851
41852fi
41853fi
41854ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41855if test -n "$ac_ct_OBJCOPY"; then
41856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41857$as_echo "$ac_ct_OBJCOPY" >&6; }
41858else
41859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41860$as_echo "no" >&6; }
41861fi
41862
41863
41864  test -n "$ac_ct_OBJCOPY" && break
41865done
41866
41867  if test "x$ac_ct_OBJCOPY" = x; then
41868    OBJCOPY=""
41869  else
41870    case $cross_compiling:$ac_tool_warned in
41871yes:)
41872{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41873$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41874ac_tool_warned=yes ;;
41875esac
41876    OBJCOPY=$ac_ct_OBJCOPY
41877  fi
41878fi
41879
41880  else
41881    # The variable is set, but is it from the command line or the environment?
41882
41883    # Try to remove the string !OBJCOPY! from our list.
41884    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41885    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41886      # If it failed, the variable was not from the command line. Ignore it,
41887      # but warn the user (except for BASH, which is always set by the calling BASH).
41888      if test "xOBJCOPY" != xBASH; then
41889        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41890$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41891      fi
41892      # Try to locate tool using the code snippet
41893      if test -n "$ac_tool_prefix"; then
41894  for ac_prog in gobjcopy objcopy
41895  do
41896    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41897set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41899$as_echo_n "checking for $ac_word... " >&6; }
41900if ${ac_cv_prog_OBJCOPY+:} false; then :
41901  $as_echo_n "(cached) " >&6
41902else
41903  if test -n "$OBJCOPY"; then
41904  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41905else
41906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41907for as_dir in $PATH
41908do
41909  IFS=$as_save_IFS
41910  test -z "$as_dir" && as_dir=.
41911    for ac_exec_ext in '' $ac_executable_extensions; do
41912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41913    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41915    break 2
41916  fi
41917done
41918  done
41919IFS=$as_save_IFS
41920
41921fi
41922fi
41923OBJCOPY=$ac_cv_prog_OBJCOPY
41924if test -n "$OBJCOPY"; then
41925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41926$as_echo "$OBJCOPY" >&6; }
41927else
41928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41929$as_echo "no" >&6; }
41930fi
41931
41932
41933    test -n "$OBJCOPY" && break
41934  done
41935fi
41936if test -z "$OBJCOPY"; then
41937  ac_ct_OBJCOPY=$OBJCOPY
41938  for ac_prog in gobjcopy objcopy
41939do
41940  # Extract the first word of "$ac_prog", so it can be a program name with args.
41941set dummy $ac_prog; ac_word=$2
41942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41943$as_echo_n "checking for $ac_word... " >&6; }
41944if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41945  $as_echo_n "(cached) " >&6
41946else
41947  if test -n "$ac_ct_OBJCOPY"; then
41948  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41949else
41950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41951for as_dir in $PATH
41952do
41953  IFS=$as_save_IFS
41954  test -z "$as_dir" && as_dir=.
41955    for ac_exec_ext in '' $ac_executable_extensions; do
41956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41957    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41959    break 2
41960  fi
41961done
41962  done
41963IFS=$as_save_IFS
41964
41965fi
41966fi
41967ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41968if test -n "$ac_ct_OBJCOPY"; then
41969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41970$as_echo "$ac_ct_OBJCOPY" >&6; }
41971else
41972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41973$as_echo "no" >&6; }
41974fi
41975
41976
41977  test -n "$ac_ct_OBJCOPY" && break
41978done
41979
41980  if test "x$ac_ct_OBJCOPY" = x; then
41981    OBJCOPY=""
41982  else
41983    case $cross_compiling:$ac_tool_warned in
41984yes:)
41985{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41986$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41987ac_tool_warned=yes ;;
41988esac
41989    OBJCOPY=$ac_ct_OBJCOPY
41990  fi
41991fi
41992
41993    else
41994      # If it succeeded, then it was overridden by the user. We will use it
41995      # for the tool.
41996
41997      # First remove it from the list of overridden variables, so we can test
41998      # for unknown variables in the end.
41999      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42000
42001      # Check if we try to supply an empty value
42002      if test "x$OBJCOPY" = x; then
42003        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42004$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42005        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42006$as_echo_n "checking for OBJCOPY... " >&6; }
42007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42008$as_echo "disabled" >&6; }
42009      else
42010        # Check if the provided tool contains a complete path.
42011        tool_specified="$OBJCOPY"
42012        tool_basename="${tool_specified##*/}"
42013        if test "x$tool_basename" = "x$tool_specified"; then
42014          # A command without a complete path is provided, search $PATH.
42015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42016$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42017          # Extract the first word of "$tool_basename", so it can be a program name with args.
42018set dummy $tool_basename; ac_word=$2
42019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42020$as_echo_n "checking for $ac_word... " >&6; }
42021if ${ac_cv_path_OBJCOPY+:} false; then :
42022  $as_echo_n "(cached) " >&6
42023else
42024  case $OBJCOPY in
42025  [\\/]* | ?:[\\/]*)
42026  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42027  ;;
42028  *)
42029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42030for as_dir in $PATH
42031do
42032  IFS=$as_save_IFS
42033  test -z "$as_dir" && as_dir=.
42034    for ac_exec_ext in '' $ac_executable_extensions; do
42035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42036    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42038    break 2
42039  fi
42040done
42041  done
42042IFS=$as_save_IFS
42043
42044  ;;
42045esac
42046fi
42047OBJCOPY=$ac_cv_path_OBJCOPY
42048if test -n "$OBJCOPY"; then
42049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42050$as_echo "$OBJCOPY" >&6; }
42051else
42052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42053$as_echo "no" >&6; }
42054fi
42055
42056
42057          if test "x$OBJCOPY" = x; then
42058            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42059          fi
42060        else
42061          # Otherwise we believe it is a complete path. Use it as it is.
42062          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42063$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42064          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42065$as_echo_n "checking for OBJCOPY... " >&6; }
42066          if test ! -x "$tool_specified"; then
42067            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42068$as_echo "not found" >&6; }
42069            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42070          fi
42071          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42072$as_echo "$tool_specified" >&6; }
42073        fi
42074      fi
42075    fi
42076
42077  fi
42078
42079
42080    # Only call fixup if objcopy was found.
42081    if test -n "$OBJCOPY"; then
42082
42083  # Only process if variable expands to non-empty
42084
42085  if test "x$OBJCOPY" != x; then
42086    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42087
42088  # First separate the path from the arguments. This will split at the first
42089  # space.
42090  complete="$OBJCOPY"
42091  path="${complete%% *}"
42092  tmp="$complete EOL"
42093  arguments="${tmp#* }"
42094
42095  # Input might be given as Windows format, start by converting to
42096  # unix format.
42097  new_path=`$CYGPATH -u "$path"`
42098
42099  # Now try to locate executable using which
42100  new_path=`$WHICH "$new_path" 2> /dev/null`
42101  # bat and cmd files are not always considered executable in cygwin causing which
42102  # to not find them
42103  if test "x$new_path" = x \
42104      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42105      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42106    new_path=`$CYGPATH -u "$path"`
42107  fi
42108  if test "x$new_path" = x; then
42109    # Oops. Which didn't find the executable.
42110    # The splitting of arguments from the executable at a space might have been incorrect,
42111    # since paths with space are more likely in Windows. Give it another try with the whole
42112    # argument.
42113    path="$complete"
42114    arguments="EOL"
42115    new_path=`$CYGPATH -u "$path"`
42116    new_path=`$WHICH "$new_path" 2> /dev/null`
42117    # bat and cmd files are not always considered executable in cygwin causing which
42118    # to not find them
42119    if test "x$new_path" = x \
42120        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42121        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42122      new_path=`$CYGPATH -u "$path"`
42123    fi
42124    if test "x$new_path" = x; then
42125      # It's still not found. Now this is an unrecoverable error.
42126      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42127$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42128      has_space=`$ECHO "$complete" | $GREP " "`
42129      if test "x$has_space" != x; then
42130        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42131$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42132      fi
42133      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42134    fi
42135  fi
42136
42137  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42138  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42139  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42140  # "foo.exe" is OK but "foo" is an error.
42141  #
42142  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42143  # It is also a way to make sure we got the proper file name for the real test later on.
42144  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42145  if test "x$test_shortpath" = x; then
42146    # Short path failed, file does not exist as specified.
42147    # Try adding .exe or .cmd
42148    if test -f "${new_path}.exe"; then
42149      input_to_shortpath="${new_path}.exe"
42150    elif test -f "${new_path}.cmd"; then
42151      input_to_shortpath="${new_path}.cmd"
42152    else
42153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42154$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42155      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42156$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42157      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42158    fi
42159  else
42160    input_to_shortpath="$new_path"
42161  fi
42162
42163  # Call helper function which possibly converts this using DOS-style short mode.
42164  # If so, the updated path is stored in $new_path.
42165  new_path="$input_to_shortpath"
42166
42167  input_path="$input_to_shortpath"
42168  # Check if we need to convert this using DOS-style short mode. If the path
42169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42170  # take no chances and rewrite it.
42171  # Note: m4 eats our [], so we need to use [ and ] instead.
42172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42173  if test "x$has_forbidden_chars" != x; then
42174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42178      # Going to short mode and back again did indeed matter. Since short mode is
42179      # case insensitive, let's make it lowercase to improve readability.
42180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42181      # Now convert it back to Unix-style (cygpath)
42182      input_path=`$CYGPATH -u "$shortmode_path"`
42183      new_path="$input_path"
42184    fi
42185  fi
42186
42187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42188  if test "x$test_cygdrive_prefix" = x; then
42189    # As a simple fix, exclude /usr/bin since it's not a real path.
42190    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42192      # a path prefixed by /cygdrive for fixpath to work.
42193      new_path="$CYGWIN_ROOT_PATH$input_path"
42194    fi
42195  fi
42196
42197  # remove trailing .exe if any
42198  new_path="${new_path/%.exe/}"
42199
42200    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42201
42202  # First separate the path from the arguments. This will split at the first
42203  # space.
42204  complete="$OBJCOPY"
42205  path="${complete%% *}"
42206  tmp="$complete EOL"
42207  arguments="${tmp#* }"
42208
42209  # Input might be given as Windows format, start by converting to
42210  # unix format.
42211  new_path="$path"
42212
42213  windows_path="$new_path"
42214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42215    unix_path=`$CYGPATH -u "$windows_path"`
42216    new_path="$unix_path"
42217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42219    new_path="$unix_path"
42220  fi
42221
42222
42223  # Now try to locate executable using which
42224  new_path=`$WHICH "$new_path" 2> /dev/null`
42225
42226  if test "x$new_path" = x; then
42227    # Oops. Which didn't find the executable.
42228    # The splitting of arguments from the executable at a space might have been incorrect,
42229    # since paths with space are more likely in Windows. Give it another try with the whole
42230    # argument.
42231    path="$complete"
42232    arguments="EOL"
42233    new_path="$path"
42234
42235  windows_path="$new_path"
42236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42237    unix_path=`$CYGPATH -u "$windows_path"`
42238    new_path="$unix_path"
42239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42241    new_path="$unix_path"
42242  fi
42243
42244
42245    new_path=`$WHICH "$new_path" 2> /dev/null`
42246    # bat and cmd files are not always considered executable in MSYS causing which
42247    # to not find them
42248    if test "x$new_path" = x \
42249        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42250        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42251      new_path="$path"
42252
42253  windows_path="$new_path"
42254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42255    unix_path=`$CYGPATH -u "$windows_path"`
42256    new_path="$unix_path"
42257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42259    new_path="$unix_path"
42260  fi
42261
42262    fi
42263
42264    if test "x$new_path" = x; then
42265      # It's still not found. Now this is an unrecoverable error.
42266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42267$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42268      has_space=`$ECHO "$complete" | $GREP " "`
42269      if test "x$has_space" != x; then
42270        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42271$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42272      fi
42273      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42274    fi
42275  fi
42276
42277  # Now new_path has a complete unix path to the binary
42278  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42279    # Keep paths in /bin as-is, but remove trailing .exe if any
42280    new_path="${new_path/%.exe/}"
42281    # Do not save /bin paths to all_fixpath_prefixes!
42282  else
42283    # Not in mixed or Windows style, start by that.
42284    new_path=`cmd //c echo $new_path`
42285
42286  input_path="$new_path"
42287  # Check if we need to convert this using DOS-style short mode. If the path
42288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42289  # take no chances and rewrite it.
42290  # Note: m4 eats our [], so we need to use [ and ] instead.
42291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42292  if test "x$has_forbidden_chars" != x; then
42293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42295  fi
42296
42297    # Output is in $new_path
42298
42299  windows_path="$new_path"
42300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42301    unix_path=`$CYGPATH -u "$windows_path"`
42302    new_path="$unix_path"
42303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42305    new_path="$unix_path"
42306  fi
42307
42308    # remove trailing .exe if any
42309    new_path="${new_path/%.exe/}"
42310
42311    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42312    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42313  fi
42314
42315    else
42316      # We're on a unix platform. Hooray! :)
42317      # First separate the path from the arguments. This will split at the first
42318      # space.
42319      complete="$OBJCOPY"
42320      path="${complete%% *}"
42321      tmp="$complete EOL"
42322      arguments="${tmp#* }"
42323
42324      # Cannot rely on the command "which" here since it doesn't always work.
42325      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42326      if test -z "$is_absolute_path"; then
42327        # Path to executable is not absolute. Find it.
42328        IFS_save="$IFS"
42329        IFS=:
42330        for p in $PATH; do
42331          if test -f "$p/$path" && test -x "$p/$path"; then
42332            new_path="$p/$path"
42333            break
42334          fi
42335        done
42336        IFS="$IFS_save"
42337      else
42338        # This is an absolute path, we can use it without further modifications.
42339        new_path="$path"
42340      fi
42341
42342      if test "x$new_path" = x; then
42343        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42344$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42345        has_space=`$ECHO "$complete" | $GREP " "`
42346        if test "x$has_space" != x; then
42347          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42348$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42349        fi
42350        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42351      fi
42352    fi
42353
42354    # Now join together the path and the arguments once again
42355    if test "x$arguments" != xEOL; then
42356      new_complete="$new_path ${arguments% *}"
42357    else
42358      new_complete="$new_path"
42359    fi
42360
42361    if test "x$complete" != "x$new_complete"; then
42362      OBJCOPY="$new_complete"
42363      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42364$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42365    fi
42366  fi
42367
42368      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42369        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42370        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42371        # - version number is last blank separate word on first line
42372        # - version number formats that have been seen:
42373        #   - <major>.<minor>
42374        #   - <major>.<minor>.<micro>
42375        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42376        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42377         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42378              -e 's/.* //' \
42379              -e '/^[01]\./b bad' \
42380              -e '/^2\./{' \
42381              -e '  s/^2\.//' \
42382              -e '  /^[0-9]$/b bad' \
42383              -e '  /^[0-9]\./b bad' \
42384              -e '  /^1[0-9]$/b bad' \
42385              -e '  /^1[0-9]\./b bad' \
42386              -e '  /^20\./b bad' \
42387              -e '  /^21\.0$/b bad' \
42388              -e '  /^21\.0\./b bad' \
42389              -e '}' \
42390              -e ':good' \
42391              -e 's/.*/VALID_VERSION/p' \
42392              -e 'q' \
42393              -e ':bad' \
42394              -e 's/.*/BAD_VERSION/p' \
42395              -e 'q'`
42396        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42397          OBJCOPY=
42398          { $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
42399$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42400          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42401$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42402          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42403$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42404          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42405$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42406          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42407$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42408        fi
42409      fi
42410    fi
42411  fi
42412
42413
42414
42415  # Publish this variable in the help.
42416
42417
42418  if [ -z "${OBJDUMP+x}" ]; then
42419    # The variable is not set by user, try to locate tool using the code snippet
42420    if test -n "$ac_tool_prefix"; then
42421  for ac_prog in gobjdump objdump
42422  do
42423    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42424set dummy $ac_tool_prefix$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_prog_OBJDUMP+:} false; then :
42428  $as_echo_n "(cached) " >&6
42429else
42430  if test -n "$OBJDUMP"; then
42431  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42432else
42433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42434for as_dir in $PATH
42435do
42436  IFS=$as_save_IFS
42437  test -z "$as_dir" && as_dir=.
42438    for ac_exec_ext in '' $ac_executable_extensions; do
42439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42440    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42442    break 2
42443  fi
42444done
42445  done
42446IFS=$as_save_IFS
42447
42448fi
42449fi
42450OBJDUMP=$ac_cv_prog_OBJDUMP
42451if test -n "$OBJDUMP"; then
42452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42453$as_echo "$OBJDUMP" >&6; }
42454else
42455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42456$as_echo "no" >&6; }
42457fi
42458
42459
42460    test -n "$OBJDUMP" && break
42461  done
42462fi
42463if test -z "$OBJDUMP"; then
42464  ac_ct_OBJDUMP=$OBJDUMP
42465  for ac_prog in gobjdump objdump
42466do
42467  # Extract the first word of "$ac_prog", so it can be a program name with args.
42468set dummy $ac_prog; ac_word=$2
42469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42470$as_echo_n "checking for $ac_word... " >&6; }
42471if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42472  $as_echo_n "(cached) " >&6
42473else
42474  if test -n "$ac_ct_OBJDUMP"; then
42475  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42476else
42477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42478for as_dir in $PATH
42479do
42480  IFS=$as_save_IFS
42481  test -z "$as_dir" && as_dir=.
42482    for ac_exec_ext in '' $ac_executable_extensions; do
42483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42484    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42486    break 2
42487  fi
42488done
42489  done
42490IFS=$as_save_IFS
42491
42492fi
42493fi
42494ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42495if test -n "$ac_ct_OBJDUMP"; then
42496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42497$as_echo "$ac_ct_OBJDUMP" >&6; }
42498else
42499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42500$as_echo "no" >&6; }
42501fi
42502
42503
42504  test -n "$ac_ct_OBJDUMP" && break
42505done
42506
42507  if test "x$ac_ct_OBJDUMP" = x; then
42508    OBJDUMP=""
42509  else
42510    case $cross_compiling:$ac_tool_warned in
42511yes:)
42512{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42513$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42514ac_tool_warned=yes ;;
42515esac
42516    OBJDUMP=$ac_ct_OBJDUMP
42517  fi
42518fi
42519
42520  else
42521    # The variable is set, but is it from the command line or the environment?
42522
42523    # Try to remove the string !OBJDUMP! from our list.
42524    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42525    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42526      # If it failed, the variable was not from the command line. Ignore it,
42527      # but warn the user (except for BASH, which is always set by the calling BASH).
42528      if test "xOBJDUMP" != xBASH; then
42529        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42530$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42531      fi
42532      # Try to locate tool using the code snippet
42533      if test -n "$ac_tool_prefix"; then
42534  for ac_prog in gobjdump objdump
42535  do
42536    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42537set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42539$as_echo_n "checking for $ac_word... " >&6; }
42540if ${ac_cv_prog_OBJDUMP+:} false; then :
42541  $as_echo_n "(cached) " >&6
42542else
42543  if test -n "$OBJDUMP"; then
42544  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42545else
42546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42547for as_dir in $PATH
42548do
42549  IFS=$as_save_IFS
42550  test -z "$as_dir" && as_dir=.
42551    for ac_exec_ext in '' $ac_executable_extensions; do
42552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42553    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42555    break 2
42556  fi
42557done
42558  done
42559IFS=$as_save_IFS
42560
42561fi
42562fi
42563OBJDUMP=$ac_cv_prog_OBJDUMP
42564if test -n "$OBJDUMP"; then
42565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42566$as_echo "$OBJDUMP" >&6; }
42567else
42568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42569$as_echo "no" >&6; }
42570fi
42571
42572
42573    test -n "$OBJDUMP" && break
42574  done
42575fi
42576if test -z "$OBJDUMP"; then
42577  ac_ct_OBJDUMP=$OBJDUMP
42578  for ac_prog in gobjdump objdump
42579do
42580  # Extract the first word of "$ac_prog", so it can be a program name with args.
42581set dummy $ac_prog; ac_word=$2
42582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42583$as_echo_n "checking for $ac_word... " >&6; }
42584if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42585  $as_echo_n "(cached) " >&6
42586else
42587  if test -n "$ac_ct_OBJDUMP"; then
42588  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42589else
42590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42591for as_dir in $PATH
42592do
42593  IFS=$as_save_IFS
42594  test -z "$as_dir" && as_dir=.
42595    for ac_exec_ext in '' $ac_executable_extensions; do
42596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42597    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42599    break 2
42600  fi
42601done
42602  done
42603IFS=$as_save_IFS
42604
42605fi
42606fi
42607ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42608if test -n "$ac_ct_OBJDUMP"; then
42609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42610$as_echo "$ac_ct_OBJDUMP" >&6; }
42611else
42612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42613$as_echo "no" >&6; }
42614fi
42615
42616
42617  test -n "$ac_ct_OBJDUMP" && break
42618done
42619
42620  if test "x$ac_ct_OBJDUMP" = x; then
42621    OBJDUMP=""
42622  else
42623    case $cross_compiling:$ac_tool_warned in
42624yes:)
42625{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42626$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42627ac_tool_warned=yes ;;
42628esac
42629    OBJDUMP=$ac_ct_OBJDUMP
42630  fi
42631fi
42632
42633    else
42634      # If it succeeded, then it was overridden by the user. We will use it
42635      # for the tool.
42636
42637      # First remove it from the list of overridden variables, so we can test
42638      # for unknown variables in the end.
42639      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42640
42641      # Check if we try to supply an empty value
42642      if test "x$OBJDUMP" = x; then
42643        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42644$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42645        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42646$as_echo_n "checking for OBJDUMP... " >&6; }
42647        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42648$as_echo "disabled" >&6; }
42649      else
42650        # Check if the provided tool contains a complete path.
42651        tool_specified="$OBJDUMP"
42652        tool_basename="${tool_specified##*/}"
42653        if test "x$tool_basename" = "x$tool_specified"; then
42654          # A command without a complete path is provided, search $PATH.
42655          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42656$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42657          # Extract the first word of "$tool_basename", so it can be a program name with args.
42658set dummy $tool_basename; ac_word=$2
42659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42660$as_echo_n "checking for $ac_word... " >&6; }
42661if ${ac_cv_path_OBJDUMP+:} false; then :
42662  $as_echo_n "(cached) " >&6
42663else
42664  case $OBJDUMP in
42665  [\\/]* | ?:[\\/]*)
42666  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42667  ;;
42668  *)
42669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42670for as_dir in $PATH
42671do
42672  IFS=$as_save_IFS
42673  test -z "$as_dir" && as_dir=.
42674    for ac_exec_ext in '' $ac_executable_extensions; do
42675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42676    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42678    break 2
42679  fi
42680done
42681  done
42682IFS=$as_save_IFS
42683
42684  ;;
42685esac
42686fi
42687OBJDUMP=$ac_cv_path_OBJDUMP
42688if test -n "$OBJDUMP"; then
42689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42690$as_echo "$OBJDUMP" >&6; }
42691else
42692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42693$as_echo "no" >&6; }
42694fi
42695
42696
42697          if test "x$OBJDUMP" = x; then
42698            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42699          fi
42700        else
42701          # Otherwise we believe it is a complete path. Use it as it is.
42702          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42703$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42704          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42705$as_echo_n "checking for OBJDUMP... " >&6; }
42706          if test ! -x "$tool_specified"; then
42707            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42708$as_echo "not found" >&6; }
42709            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42710          fi
42711          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42712$as_echo "$tool_specified" >&6; }
42713        fi
42714      fi
42715    fi
42716
42717  fi
42718
42719
42720  if test "x$OBJDUMP" != x; then
42721    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42722    # bails if argument is missing.
42723
42724  # Only process if variable expands to non-empty
42725
42726  if test "x$OBJDUMP" != x; then
42727    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42728
42729  # First separate the path from the arguments. This will split at the first
42730  # space.
42731  complete="$OBJDUMP"
42732  path="${complete%% *}"
42733  tmp="$complete EOL"
42734  arguments="${tmp#* }"
42735
42736  # Input might be given as Windows format, start by converting to
42737  # unix format.
42738  new_path=`$CYGPATH -u "$path"`
42739
42740  # Now try to locate executable using which
42741  new_path=`$WHICH "$new_path" 2> /dev/null`
42742  # bat and cmd files are not always considered executable in cygwin causing which
42743  # to not find them
42744  if test "x$new_path" = x \
42745      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42746      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42747    new_path=`$CYGPATH -u "$path"`
42748  fi
42749  if test "x$new_path" = x; then
42750    # Oops. Which didn't find the executable.
42751    # The splitting of arguments from the executable at a space might have been incorrect,
42752    # since paths with space are more likely in Windows. Give it another try with the whole
42753    # argument.
42754    path="$complete"
42755    arguments="EOL"
42756    new_path=`$CYGPATH -u "$path"`
42757    new_path=`$WHICH "$new_path" 2> /dev/null`
42758    # bat and cmd files are not always considered executable in cygwin causing which
42759    # to not find them
42760    if test "x$new_path" = x \
42761        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42762        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42763      new_path=`$CYGPATH -u "$path"`
42764    fi
42765    if test "x$new_path" = x; then
42766      # It's still not found. Now this is an unrecoverable error.
42767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42768$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42769      has_space=`$ECHO "$complete" | $GREP " "`
42770      if test "x$has_space" != x; then
42771        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42772$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42773      fi
42774      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42775    fi
42776  fi
42777
42778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42781  # "foo.exe" is OK but "foo" is an error.
42782  #
42783  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42784  # It is also a way to make sure we got the proper file name for the real test later on.
42785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42786  if test "x$test_shortpath" = x; then
42787    # Short path failed, file does not exist as specified.
42788    # Try adding .exe or .cmd
42789    if test -f "${new_path}.exe"; then
42790      input_to_shortpath="${new_path}.exe"
42791    elif test -f "${new_path}.cmd"; then
42792      input_to_shortpath="${new_path}.cmd"
42793    else
42794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
42795$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
42796      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42797$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42798      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42799    fi
42800  else
42801    input_to_shortpath="$new_path"
42802  fi
42803
42804  # Call helper function which possibly converts this using DOS-style short mode.
42805  # If so, the updated path is stored in $new_path.
42806  new_path="$input_to_shortpath"
42807
42808  input_path="$input_to_shortpath"
42809  # Check if we need to convert this using DOS-style short mode. If the path
42810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42811  # take no chances and rewrite it.
42812  # Note: m4 eats our [], so we need to use [ and ] instead.
42813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42814  if test "x$has_forbidden_chars" != x; then
42815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42819      # Going to short mode and back again did indeed matter. Since short mode is
42820      # case insensitive, let's make it lowercase to improve readability.
42821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42822      # Now convert it back to Unix-style (cygpath)
42823      input_path=`$CYGPATH -u "$shortmode_path"`
42824      new_path="$input_path"
42825    fi
42826  fi
42827
42828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42829  if test "x$test_cygdrive_prefix" = x; then
42830    # As a simple fix, exclude /usr/bin since it's not a real path.
42831    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42833      # a path prefixed by /cygdrive for fixpath to work.
42834      new_path="$CYGWIN_ROOT_PATH$input_path"
42835    fi
42836  fi
42837
42838  # remove trailing .exe if any
42839  new_path="${new_path/%.exe/}"
42840
42841    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42842
42843  # First separate the path from the arguments. This will split at the first
42844  # space.
42845  complete="$OBJDUMP"
42846  path="${complete%% *}"
42847  tmp="$complete EOL"
42848  arguments="${tmp#* }"
42849
42850  # Input might be given as Windows format, start by converting to
42851  # unix format.
42852  new_path="$path"
42853
42854  windows_path="$new_path"
42855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42856    unix_path=`$CYGPATH -u "$windows_path"`
42857    new_path="$unix_path"
42858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42860    new_path="$unix_path"
42861  fi
42862
42863
42864  # Now try to locate executable using which
42865  new_path=`$WHICH "$new_path" 2> /dev/null`
42866
42867  if test "x$new_path" = x; then
42868    # Oops. Which didn't find the executable.
42869    # The splitting of arguments from the executable at a space might have been incorrect,
42870    # since paths with space are more likely in Windows. Give it another try with the whole
42871    # argument.
42872    path="$complete"
42873    arguments="EOL"
42874    new_path="$path"
42875
42876  windows_path="$new_path"
42877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42878    unix_path=`$CYGPATH -u "$windows_path"`
42879    new_path="$unix_path"
42880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42882    new_path="$unix_path"
42883  fi
42884
42885
42886    new_path=`$WHICH "$new_path" 2> /dev/null`
42887    # bat and cmd files are not always considered executable in MSYS causing which
42888    # to not find them
42889    if test "x$new_path" = x \
42890        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42891        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42892      new_path="$path"
42893
42894  windows_path="$new_path"
42895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42896    unix_path=`$CYGPATH -u "$windows_path"`
42897    new_path="$unix_path"
42898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42900    new_path="$unix_path"
42901  fi
42902
42903    fi
42904
42905    if test "x$new_path" = x; then
42906      # It's still not found. Now this is an unrecoverable error.
42907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42908$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42909      has_space=`$ECHO "$complete" | $GREP " "`
42910      if test "x$has_space" != x; then
42911        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42912$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42913      fi
42914      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42915    fi
42916  fi
42917
42918  # Now new_path has a complete unix path to the binary
42919  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42920    # Keep paths in /bin as-is, but remove trailing .exe if any
42921    new_path="${new_path/%.exe/}"
42922    # Do not save /bin paths to all_fixpath_prefixes!
42923  else
42924    # Not in mixed or Windows style, start by that.
42925    new_path=`cmd //c echo $new_path`
42926
42927  input_path="$new_path"
42928  # Check if we need to convert this using DOS-style short mode. If the path
42929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42930  # take no chances and rewrite it.
42931  # Note: m4 eats our [], so we need to use [ and ] instead.
42932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42933  if test "x$has_forbidden_chars" != x; then
42934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42936  fi
42937
42938    # Output is in $new_path
42939
42940  windows_path="$new_path"
42941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42942    unix_path=`$CYGPATH -u "$windows_path"`
42943    new_path="$unix_path"
42944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42946    new_path="$unix_path"
42947  fi
42948
42949    # remove trailing .exe if any
42950    new_path="${new_path/%.exe/}"
42951
42952    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42953    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42954  fi
42955
42956    else
42957      # We're on a unix platform. Hooray! :)
42958      # First separate the path from the arguments. This will split at the first
42959      # space.
42960      complete="$OBJDUMP"
42961      path="${complete%% *}"
42962      tmp="$complete EOL"
42963      arguments="${tmp#* }"
42964
42965      # Cannot rely on the command "which" here since it doesn't always work.
42966      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42967      if test -z "$is_absolute_path"; then
42968        # Path to executable is not absolute. Find it.
42969        IFS_save="$IFS"
42970        IFS=:
42971        for p in $PATH; do
42972          if test -f "$p/$path" && test -x "$p/$path"; then
42973            new_path="$p/$path"
42974            break
42975          fi
42976        done
42977        IFS="$IFS_save"
42978      else
42979        # This is an absolute path, we can use it without further modifications.
42980        new_path="$path"
42981      fi
42982
42983      if test "x$new_path" = x; then
42984        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42985$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42986        has_space=`$ECHO "$complete" | $GREP " "`
42987        if test "x$has_space" != x; then
42988          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42989$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42990        fi
42991        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42992      fi
42993    fi
42994
42995    # Now join together the path and the arguments once again
42996    if test "x$arguments" != xEOL; then
42997      new_complete="$new_path ${arguments% *}"
42998    else
42999      new_complete="$new_path"
43000    fi
43001
43002    if test "x$complete" != "x$new_complete"; then
43003      OBJDUMP="$new_complete"
43004      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43005$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43006    fi
43007  fi
43008
43009  fi
43010
43011
43012  # Restore old path.
43013  PATH="$OLD_PATH"
43014
43015  # Restore the flags to the user specified values.
43016  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43017  CFLAGS="$ORG_CFLAGS"
43018  CXXFLAGS="$ORG_CXXFLAGS"
43019
43020
43021# Finally do some processing after the detection phase
43022
43023  if test "x$COMPILE_TYPE" = "xcross"; then
43024    # Now we need to find a C/C++ compiler that can build executables for the
43025    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43026    # used once. Also, we need to do this without adding a tools dir to the
43027    # path, otherwise we might pick up cross-compilers which don't use standard
43028    # naming.
43029
43030    OLDPATH="$PATH"
43031
43032
43033# Check whether --with-build-devkit was given.
43034if test "${with_build_devkit+set}" = set; then :
43035  withval=$with_build_devkit;
43036fi
43037
43038    if test "x$with_build_devkit" = "xyes"; then
43039      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43040    elif test -n "$with_build_devkit"; then
43041      if test ! -d "$with_build_devkit"; then
43042        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43043      else
43044
43045  # Only process if variable expands to non-empty
43046
43047  if test "x$with_build_devkit" != x; then
43048    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43049
43050  # Input might be given as Windows format, start by converting to
43051  # unix format.
43052  path="$with_build_devkit"
43053  new_path=`$CYGPATH -u "$path"`
43054
43055  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43056  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43057  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43058  # "foo.exe" is OK but "foo" is an error.
43059  #
43060  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43061  # It is also a way to make sure we got the proper file name for the real test later on.
43062  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43063  if test "x$test_shortpath" = x; then
43064    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43065$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43066    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43067  fi
43068
43069  # Call helper function which possibly converts this using DOS-style short mode.
43070  # If so, the updated path is stored in $new_path.
43071
43072  input_path="$new_path"
43073  # Check if we need to convert this using DOS-style short mode. If the path
43074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43075  # take no chances and rewrite it.
43076  # Note: m4 eats our [], so we need to use [ and ] instead.
43077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43078  if test "x$has_forbidden_chars" != x; then
43079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43080    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43081    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43082    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43083      # Going to short mode and back again did indeed matter. Since short mode is
43084      # case insensitive, let's make it lowercase to improve readability.
43085      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43086      # Now convert it back to Unix-style (cygpath)
43087      input_path=`$CYGPATH -u "$shortmode_path"`
43088      new_path="$input_path"
43089    fi
43090  fi
43091
43092  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43093  if test "x$test_cygdrive_prefix" = x; then
43094    # As a simple fix, exclude /usr/bin since it's not a real path.
43095    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43096      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43097      # a path prefixed by /cygdrive for fixpath to work.
43098      new_path="$CYGWIN_ROOT_PATH$input_path"
43099    fi
43100  fi
43101
43102
43103  if test "x$path" != "x$new_path"; then
43104    with_build_devkit="$new_path"
43105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43106$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43107  fi
43108
43109    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43110
43111  path="$with_build_devkit"
43112  has_colon=`$ECHO $path | $GREP ^.:`
43113  new_path="$path"
43114  if test "x$has_colon" = x; then
43115    # Not in mixed or Windows style, start by that.
43116    new_path=`cmd //c echo $path`
43117  fi
43118
43119
43120  input_path="$new_path"
43121  # Check if we need to convert this using DOS-style short mode. If the path
43122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43123  # take no chances and rewrite it.
43124  # Note: m4 eats our [], so we need to use [ and ] instead.
43125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43126  if test "x$has_forbidden_chars" != x; then
43127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43129  fi
43130
43131
43132  windows_path="$new_path"
43133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43134    unix_path=`$CYGPATH -u "$windows_path"`
43135    new_path="$unix_path"
43136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43138    new_path="$unix_path"
43139  fi
43140
43141  if test "x$path" != "x$new_path"; then
43142    with_build_devkit="$new_path"
43143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43144$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43145  fi
43146
43147  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43148  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43149
43150    else
43151      # We're on a unix platform. Hooray! :)
43152      path="$with_build_devkit"
43153      has_space=`$ECHO "$path" | $GREP " "`
43154      if test "x$has_space" != x; then
43155        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43156$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43157        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43158      fi
43159
43160      # Use eval to expand a potential ~
43161      eval path="$path"
43162      if test ! -f "$path" && test ! -d "$path"; then
43163        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43164      fi
43165
43166      if test -d "$path"; then
43167        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43168      else
43169        dir="`$DIRNAME "$path"`"
43170        base="`$BASENAME "$path"`"
43171        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43172      fi
43173    fi
43174  fi
43175
43176        BUILD_DEVKIT_ROOT="$with_build_devkit"
43177        # Check for a meta data info file in the root of the devkit
43178        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43179          # Process devkit.info so that existing devkit variables are not
43180          # modified by this
43181          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43182              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43183              -e "s/\$host/\$build/g" \
43184              $BUILD_DEVKIT_ROOT/devkit.info \
43185              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43186          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43187          # This potentially sets the following:
43188          # A descriptive name of the devkit
43189
43190  if test "x$BUILD_DEVKIT_NAME" = x; then
43191    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43192  fi
43193
43194          # Corresponds to --with-extra-path
43195
43196  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43197    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43198  fi
43199
43200          # Corresponds to --with-toolchain-path
43201
43202  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43203    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43204  fi
43205
43206          # Corresponds to --with-sysroot
43207
43208  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43209    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43210  fi
43211
43212          # Skip the Window specific parts
43213        fi
43214
43215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43216$as_echo_n "checking for build platform devkit... " >&6; }
43217        if test "x$BUILD_DEVKIT_NAME" != x; then
43218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43219$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43220        else
43221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43222$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43223        fi
43224
43225        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43226
43227  if test "x$BUILD_SYSROOT" != "x"; then
43228    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43229      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43230        # Solaris Studio does not have a concept of sysroot. Instead we must
43231        # make sure the default include and lib dirs are appended to each
43232        # compile and link command line.
43233        BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
43234        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43235            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43236            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43237      fi
43238    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43239      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43240      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43241    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43242      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43243      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43244    fi
43245    # Propagate the sysroot args to hotspot
43246    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43247    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43248    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43249    # The global CFLAGS and LDFLAGS variables need these for configure to function
43250    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43251    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43252    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43253    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43254  fi
43255
43256  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43257    # We also need -iframework<path>/System/Library/Frameworks
43258    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43259    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43260    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43261    # set this here so it doesn't have to be peppered throughout the forest
43262    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43263    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43264  fi
43265
43266
43267
43268
43269
43270         # Fallback default of just /bin if DEVKIT_PATH is not defined
43271        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43272          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43273        fi
43274        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43275      fi
43276    fi
43277
43278    # FIXME: we should list the discovered compilers as an exclude pattern!
43279    # If we do that, we can do this detection before POST_DETECTION, and still
43280    # find the build compilers in the tools dir, if needed.
43281
43282
43283
43284  # Publish this variable in the help.
43285
43286
43287  if [ -z "${BUILD_CC+x}" ]; then
43288    # The variable is not set by user, try to locate tool using the code snippet
43289    for ac_prog in cl cc gcc
43290do
43291  # Extract the first word of "$ac_prog", so it can be a program name with args.
43292set dummy $ac_prog; ac_word=$2
43293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43294$as_echo_n "checking for $ac_word... " >&6; }
43295if ${ac_cv_path_BUILD_CC+:} false; then :
43296  $as_echo_n "(cached) " >&6
43297else
43298  case $BUILD_CC in
43299  [\\/]* | ?:[\\/]*)
43300  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43301  ;;
43302  *)
43303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43304for as_dir in $PATH
43305do
43306  IFS=$as_save_IFS
43307  test -z "$as_dir" && as_dir=.
43308    for ac_exec_ext in '' $ac_executable_extensions; do
43309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43310    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43312    break 2
43313  fi
43314done
43315  done
43316IFS=$as_save_IFS
43317
43318  ;;
43319esac
43320fi
43321BUILD_CC=$ac_cv_path_BUILD_CC
43322if test -n "$BUILD_CC"; then
43323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43324$as_echo "$BUILD_CC" >&6; }
43325else
43326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43327$as_echo "no" >&6; }
43328fi
43329
43330
43331  test -n "$BUILD_CC" && break
43332done
43333
43334  else
43335    # The variable is set, but is it from the command line or the environment?
43336
43337    # Try to remove the string !BUILD_CC! from our list.
43338    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43339    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43340      # If it failed, the variable was not from the command line. Ignore it,
43341      # but warn the user (except for BASH, which is always set by the calling BASH).
43342      if test "xBUILD_CC" != xBASH; then
43343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43344$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43345      fi
43346      # Try to locate tool using the code snippet
43347      for ac_prog in cl cc gcc
43348do
43349  # Extract the first word of "$ac_prog", so it can be a program name with args.
43350set dummy $ac_prog; ac_word=$2
43351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43352$as_echo_n "checking for $ac_word... " >&6; }
43353if ${ac_cv_path_BUILD_CC+:} false; then :
43354  $as_echo_n "(cached) " >&6
43355else
43356  case $BUILD_CC in
43357  [\\/]* | ?:[\\/]*)
43358  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43359  ;;
43360  *)
43361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43362for as_dir in $PATH
43363do
43364  IFS=$as_save_IFS
43365  test -z "$as_dir" && as_dir=.
43366    for ac_exec_ext in '' $ac_executable_extensions; do
43367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43368    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43370    break 2
43371  fi
43372done
43373  done
43374IFS=$as_save_IFS
43375
43376  ;;
43377esac
43378fi
43379BUILD_CC=$ac_cv_path_BUILD_CC
43380if test -n "$BUILD_CC"; then
43381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43382$as_echo "$BUILD_CC" >&6; }
43383else
43384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43385$as_echo "no" >&6; }
43386fi
43387
43388
43389  test -n "$BUILD_CC" && break
43390done
43391
43392    else
43393      # If it succeeded, then it was overridden by the user. We will use it
43394      # for the tool.
43395
43396      # First remove it from the list of overridden variables, so we can test
43397      # for unknown variables in the end.
43398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43399
43400      # Check if we try to supply an empty value
43401      if test "x$BUILD_CC" = x; then
43402        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43403$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43405$as_echo_n "checking for BUILD_CC... " >&6; }
43406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43407$as_echo "disabled" >&6; }
43408      else
43409        # Check if the provided tool contains a complete path.
43410        tool_specified="$BUILD_CC"
43411        tool_basename="${tool_specified##*/}"
43412        if test "x$tool_basename" = "x$tool_specified"; then
43413          # A command without a complete path is provided, search $PATH.
43414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43415$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43416          # Extract the first word of "$tool_basename", so it can be a program name with args.
43417set dummy $tool_basename; ac_word=$2
43418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43419$as_echo_n "checking for $ac_word... " >&6; }
43420if ${ac_cv_path_BUILD_CC+:} false; then :
43421  $as_echo_n "(cached) " >&6
43422else
43423  case $BUILD_CC in
43424  [\\/]* | ?:[\\/]*)
43425  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43426  ;;
43427  *)
43428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43429for as_dir in $PATH
43430do
43431  IFS=$as_save_IFS
43432  test -z "$as_dir" && as_dir=.
43433    for ac_exec_ext in '' $ac_executable_extensions; do
43434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43435    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43437    break 2
43438  fi
43439done
43440  done
43441IFS=$as_save_IFS
43442
43443  ;;
43444esac
43445fi
43446BUILD_CC=$ac_cv_path_BUILD_CC
43447if test -n "$BUILD_CC"; then
43448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43449$as_echo "$BUILD_CC" >&6; }
43450else
43451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43452$as_echo "no" >&6; }
43453fi
43454
43455
43456          if test "x$BUILD_CC" = x; then
43457            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43458          fi
43459        else
43460          # Otherwise we believe it is a complete path. Use it as it is.
43461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43462$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43463          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43464$as_echo_n "checking for BUILD_CC... " >&6; }
43465          if test ! -x "$tool_specified"; then
43466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43467$as_echo "not found" >&6; }
43468            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43469          fi
43470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43471$as_echo "$tool_specified" >&6; }
43472        fi
43473      fi
43474    fi
43475
43476  fi
43477
43478
43479
43480  if test "x$BUILD_CC" = x; then
43481    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43482  fi
43483
43484
43485
43486  # Only process if variable expands to non-empty
43487
43488  if test "x$BUILD_CC" != x; then
43489    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43490
43491  # First separate the path from the arguments. This will split at the first
43492  # space.
43493  complete="$BUILD_CC"
43494  path="${complete%% *}"
43495  tmp="$complete EOL"
43496  arguments="${tmp#* }"
43497
43498  # Input might be given as Windows format, start by converting to
43499  # unix format.
43500  new_path=`$CYGPATH -u "$path"`
43501
43502  # Now try to locate executable using which
43503  new_path=`$WHICH "$new_path" 2> /dev/null`
43504  # bat and cmd files are not always considered executable in cygwin causing which
43505  # to not find them
43506  if test "x$new_path" = x \
43507      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43508      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43509    new_path=`$CYGPATH -u "$path"`
43510  fi
43511  if test "x$new_path" = x; then
43512    # Oops. Which didn't find the executable.
43513    # The splitting of arguments from the executable at a space might have been incorrect,
43514    # since paths with space are more likely in Windows. Give it another try with the whole
43515    # argument.
43516    path="$complete"
43517    arguments="EOL"
43518    new_path=`$CYGPATH -u "$path"`
43519    new_path=`$WHICH "$new_path" 2> /dev/null`
43520    # bat and cmd files are not always considered executable in cygwin causing which
43521    # to not find them
43522    if test "x$new_path" = x \
43523        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43524        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43525      new_path=`$CYGPATH -u "$path"`
43526    fi
43527    if test "x$new_path" = x; then
43528      # It's still not found. Now this is an unrecoverable error.
43529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43530$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43531      has_space=`$ECHO "$complete" | $GREP " "`
43532      if test "x$has_space" != x; then
43533        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43534$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43535      fi
43536      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43537    fi
43538  fi
43539
43540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43543  # "foo.exe" is OK but "foo" is an error.
43544  #
43545  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43546  # It is also a way to make sure we got the proper file name for the real test later on.
43547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43548  if test "x$test_shortpath" = x; then
43549    # Short path failed, file does not exist as specified.
43550    # Try adding .exe or .cmd
43551    if test -f "${new_path}.exe"; then
43552      input_to_shortpath="${new_path}.exe"
43553    elif test -f "${new_path}.cmd"; then
43554      input_to_shortpath="${new_path}.cmd"
43555    else
43556      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43557$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43558      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43559$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43560      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43561    fi
43562  else
43563    input_to_shortpath="$new_path"
43564  fi
43565
43566  # Call helper function which possibly converts this using DOS-style short mode.
43567  # If so, the updated path is stored in $new_path.
43568  new_path="$input_to_shortpath"
43569
43570  input_path="$input_to_shortpath"
43571  # Check if we need to convert this using DOS-style short mode. If the path
43572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43573  # take no chances and rewrite it.
43574  # Note: m4 eats our [], so we need to use [ and ] instead.
43575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43576  if test "x$has_forbidden_chars" != x; then
43577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43578    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43579    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43580    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43581      # Going to short mode and back again did indeed matter. Since short mode is
43582      # case insensitive, let's make it lowercase to improve readability.
43583      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43584      # Now convert it back to Unix-style (cygpath)
43585      input_path=`$CYGPATH -u "$shortmode_path"`
43586      new_path="$input_path"
43587    fi
43588  fi
43589
43590  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43591  if test "x$test_cygdrive_prefix" = x; then
43592    # As a simple fix, exclude /usr/bin since it's not a real path.
43593    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43594      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43595      # a path prefixed by /cygdrive for fixpath to work.
43596      new_path="$CYGWIN_ROOT_PATH$input_path"
43597    fi
43598  fi
43599
43600  # remove trailing .exe if any
43601  new_path="${new_path/%.exe/}"
43602
43603    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43604
43605  # First separate the path from the arguments. This will split at the first
43606  # space.
43607  complete="$BUILD_CC"
43608  path="${complete%% *}"
43609  tmp="$complete EOL"
43610  arguments="${tmp#* }"
43611
43612  # Input might be given as Windows format, start by converting to
43613  # unix format.
43614  new_path="$path"
43615
43616  windows_path="$new_path"
43617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43618    unix_path=`$CYGPATH -u "$windows_path"`
43619    new_path="$unix_path"
43620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43622    new_path="$unix_path"
43623  fi
43624
43625
43626  # Now try to locate executable using which
43627  new_path=`$WHICH "$new_path" 2> /dev/null`
43628
43629  if test "x$new_path" = x; then
43630    # Oops. Which didn't find the executable.
43631    # The splitting of arguments from the executable at a space might have been incorrect,
43632    # since paths with space are more likely in Windows. Give it another try with the whole
43633    # argument.
43634    path="$complete"
43635    arguments="EOL"
43636    new_path="$path"
43637
43638  windows_path="$new_path"
43639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43640    unix_path=`$CYGPATH -u "$windows_path"`
43641    new_path="$unix_path"
43642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43644    new_path="$unix_path"
43645  fi
43646
43647
43648    new_path=`$WHICH "$new_path" 2> /dev/null`
43649    # bat and cmd files are not always considered executable in MSYS causing which
43650    # to not find them
43651    if test "x$new_path" = x \
43652        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43653        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43654      new_path="$path"
43655
43656  windows_path="$new_path"
43657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43658    unix_path=`$CYGPATH -u "$windows_path"`
43659    new_path="$unix_path"
43660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43662    new_path="$unix_path"
43663  fi
43664
43665    fi
43666
43667    if test "x$new_path" = x; then
43668      # It's still not found. Now this is an unrecoverable error.
43669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43670$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43671      has_space=`$ECHO "$complete" | $GREP " "`
43672      if test "x$has_space" != x; then
43673        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43674$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43675      fi
43676      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43677    fi
43678  fi
43679
43680  # Now new_path has a complete unix path to the binary
43681  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43682    # Keep paths in /bin as-is, but remove trailing .exe if any
43683    new_path="${new_path/%.exe/}"
43684    # Do not save /bin paths to all_fixpath_prefixes!
43685  else
43686    # Not in mixed or Windows style, start by that.
43687    new_path=`cmd //c echo $new_path`
43688
43689  input_path="$new_path"
43690  # Check if we need to convert this using DOS-style short mode. If the path
43691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43692  # take no chances and rewrite it.
43693  # Note: m4 eats our [], so we need to use [ and ] instead.
43694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43695  if test "x$has_forbidden_chars" != x; then
43696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43698  fi
43699
43700    # Output is in $new_path
43701
43702  windows_path="$new_path"
43703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43704    unix_path=`$CYGPATH -u "$windows_path"`
43705    new_path="$unix_path"
43706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43708    new_path="$unix_path"
43709  fi
43710
43711    # remove trailing .exe if any
43712    new_path="${new_path/%.exe/}"
43713
43714    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43715    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43716  fi
43717
43718    else
43719      # We're on a unix platform. Hooray! :)
43720      # First separate the path from the arguments. This will split at the first
43721      # space.
43722      complete="$BUILD_CC"
43723      path="${complete%% *}"
43724      tmp="$complete EOL"
43725      arguments="${tmp#* }"
43726
43727      # Cannot rely on the command "which" here since it doesn't always work.
43728      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43729      if test -z "$is_absolute_path"; then
43730        # Path to executable is not absolute. Find it.
43731        IFS_save="$IFS"
43732        IFS=:
43733        for p in $PATH; do
43734          if test -f "$p/$path" && test -x "$p/$path"; then
43735            new_path="$p/$path"
43736            break
43737          fi
43738        done
43739        IFS="$IFS_save"
43740      else
43741        # This is an absolute path, we can use it without further modifications.
43742        new_path="$path"
43743      fi
43744
43745      if test "x$new_path" = x; then
43746        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43747$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43748        has_space=`$ECHO "$complete" | $GREP " "`
43749        if test "x$has_space" != x; then
43750          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43751$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43752        fi
43753        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43754      fi
43755    fi
43756
43757    # Now join together the path and the arguments once again
43758    if test "x$arguments" != xEOL; then
43759      new_complete="$new_path ${arguments% *}"
43760    else
43761      new_complete="$new_path"
43762    fi
43763
43764    if test "x$complete" != "x$new_complete"; then
43765      BUILD_CC="$new_complete"
43766      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
43767$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
43768    fi
43769  fi
43770
43771
43772
43773
43774  # Publish this variable in the help.
43775
43776
43777  if [ -z "${BUILD_CXX+x}" ]; then
43778    # The variable is not set by user, try to locate tool using the code snippet
43779    for ac_prog in cl CC g++
43780do
43781  # Extract the first word of "$ac_prog", so it can be a program name with args.
43782set dummy $ac_prog; ac_word=$2
43783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43784$as_echo_n "checking for $ac_word... " >&6; }
43785if ${ac_cv_path_BUILD_CXX+:} false; then :
43786  $as_echo_n "(cached) " >&6
43787else
43788  case $BUILD_CXX in
43789  [\\/]* | ?:[\\/]*)
43790  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43791  ;;
43792  *)
43793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43794for as_dir in $PATH
43795do
43796  IFS=$as_save_IFS
43797  test -z "$as_dir" && as_dir=.
43798    for ac_exec_ext in '' $ac_executable_extensions; do
43799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43800    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43802    break 2
43803  fi
43804done
43805  done
43806IFS=$as_save_IFS
43807
43808  ;;
43809esac
43810fi
43811BUILD_CXX=$ac_cv_path_BUILD_CXX
43812if test -n "$BUILD_CXX"; then
43813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43814$as_echo "$BUILD_CXX" >&6; }
43815else
43816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43817$as_echo "no" >&6; }
43818fi
43819
43820
43821  test -n "$BUILD_CXX" && break
43822done
43823
43824  else
43825    # The variable is set, but is it from the command line or the environment?
43826
43827    # Try to remove the string !BUILD_CXX! from our list.
43828    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
43829    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43830      # If it failed, the variable was not from the command line. Ignore it,
43831      # but warn the user (except for BASH, which is always set by the calling BASH).
43832      if test "xBUILD_CXX" != xBASH; then
43833        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
43834$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
43835      fi
43836      # Try to locate tool using the code snippet
43837      for ac_prog in cl CC g++
43838do
43839  # Extract the first word of "$ac_prog", so it can be a program name with args.
43840set dummy $ac_prog; ac_word=$2
43841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43842$as_echo_n "checking for $ac_word... " >&6; }
43843if ${ac_cv_path_BUILD_CXX+:} false; then :
43844  $as_echo_n "(cached) " >&6
43845else
43846  case $BUILD_CXX in
43847  [\\/]* | ?:[\\/]*)
43848  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43849  ;;
43850  *)
43851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43852for as_dir in $PATH
43853do
43854  IFS=$as_save_IFS
43855  test -z "$as_dir" && as_dir=.
43856    for ac_exec_ext in '' $ac_executable_extensions; do
43857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43858    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43860    break 2
43861  fi
43862done
43863  done
43864IFS=$as_save_IFS
43865
43866  ;;
43867esac
43868fi
43869BUILD_CXX=$ac_cv_path_BUILD_CXX
43870if test -n "$BUILD_CXX"; then
43871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43872$as_echo "$BUILD_CXX" >&6; }
43873else
43874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43875$as_echo "no" >&6; }
43876fi
43877
43878
43879  test -n "$BUILD_CXX" && break
43880done
43881
43882    else
43883      # If it succeeded, then it was overridden by the user. We will use it
43884      # for the tool.
43885
43886      # First remove it from the list of overridden variables, so we can test
43887      # for unknown variables in the end.
43888      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43889
43890      # Check if we try to supply an empty value
43891      if test "x$BUILD_CXX" = x; then
43892        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43893$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43894        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43895$as_echo_n "checking for BUILD_CXX... " >&6; }
43896        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43897$as_echo "disabled" >&6; }
43898      else
43899        # Check if the provided tool contains a complete path.
43900        tool_specified="$BUILD_CXX"
43901        tool_basename="${tool_specified##*/}"
43902        if test "x$tool_basename" = "x$tool_specified"; then
43903          # A command without a complete path is provided, search $PATH.
43904          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43905$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43906          # Extract the first word of "$tool_basename", so it can be a program name with args.
43907set dummy $tool_basename; ac_word=$2
43908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43909$as_echo_n "checking for $ac_word... " >&6; }
43910if ${ac_cv_path_BUILD_CXX+:} false; then :
43911  $as_echo_n "(cached) " >&6
43912else
43913  case $BUILD_CXX in
43914  [\\/]* | ?:[\\/]*)
43915  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43916  ;;
43917  *)
43918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43919for as_dir in $PATH
43920do
43921  IFS=$as_save_IFS
43922  test -z "$as_dir" && as_dir=.
43923    for ac_exec_ext in '' $ac_executable_extensions; do
43924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43925    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43927    break 2
43928  fi
43929done
43930  done
43931IFS=$as_save_IFS
43932
43933  ;;
43934esac
43935fi
43936BUILD_CXX=$ac_cv_path_BUILD_CXX
43937if test -n "$BUILD_CXX"; then
43938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43939$as_echo "$BUILD_CXX" >&6; }
43940else
43941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43942$as_echo "no" >&6; }
43943fi
43944
43945
43946          if test "x$BUILD_CXX" = x; then
43947            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43948          fi
43949        else
43950          # Otherwise we believe it is a complete path. Use it as it is.
43951          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43952$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43953          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43954$as_echo_n "checking for BUILD_CXX... " >&6; }
43955          if test ! -x "$tool_specified"; then
43956            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43957$as_echo "not found" >&6; }
43958            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43959          fi
43960          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43961$as_echo "$tool_specified" >&6; }
43962        fi
43963      fi
43964    fi
43965
43966  fi
43967
43968
43969
43970  if test "x$BUILD_CXX" = x; then
43971    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43972  fi
43973
43974
43975
43976  # Only process if variable expands to non-empty
43977
43978  if test "x$BUILD_CXX" != x; then
43979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43980
43981  # First separate the path from the arguments. This will split at the first
43982  # space.
43983  complete="$BUILD_CXX"
43984  path="${complete%% *}"
43985  tmp="$complete EOL"
43986  arguments="${tmp#* }"
43987
43988  # Input might be given as Windows format, start by converting to
43989  # unix format.
43990  new_path=`$CYGPATH -u "$path"`
43991
43992  # Now try to locate executable using which
43993  new_path=`$WHICH "$new_path" 2> /dev/null`
43994  # bat and cmd files are not always considered executable in cygwin causing which
43995  # to not find them
43996  if test "x$new_path" = x \
43997      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43998      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43999    new_path=`$CYGPATH -u "$path"`
44000  fi
44001  if test "x$new_path" = x; then
44002    # Oops. Which didn't find the executable.
44003    # The splitting of arguments from the executable at a space might have been incorrect,
44004    # since paths with space are more likely in Windows. Give it another try with the whole
44005    # argument.
44006    path="$complete"
44007    arguments="EOL"
44008    new_path=`$CYGPATH -u "$path"`
44009    new_path=`$WHICH "$new_path" 2> /dev/null`
44010    # bat and cmd files are not always considered executable in cygwin causing which
44011    # to not find them
44012    if test "x$new_path" = x \
44013        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44014        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44015      new_path=`$CYGPATH -u "$path"`
44016    fi
44017    if test "x$new_path" = x; then
44018      # It's still not found. Now this is an unrecoverable error.
44019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44020$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44021      has_space=`$ECHO "$complete" | $GREP " "`
44022      if test "x$has_space" != x; then
44023        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44024$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44025      fi
44026      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44027    fi
44028  fi
44029
44030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44033  # "foo.exe" is OK but "foo" is an error.
44034  #
44035  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44036  # It is also a way to make sure we got the proper file name for the real test later on.
44037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44038  if test "x$test_shortpath" = x; then
44039    # Short path failed, file does not exist as specified.
44040    # Try adding .exe or .cmd
44041    if test -f "${new_path}.exe"; then
44042      input_to_shortpath="${new_path}.exe"
44043    elif test -f "${new_path}.cmd"; then
44044      input_to_shortpath="${new_path}.cmd"
44045    else
44046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44047$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44048      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44049$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44050      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44051    fi
44052  else
44053    input_to_shortpath="$new_path"
44054  fi
44055
44056  # Call helper function which possibly converts this using DOS-style short mode.
44057  # If so, the updated path is stored in $new_path.
44058  new_path="$input_to_shortpath"
44059
44060  input_path="$input_to_shortpath"
44061  # Check if we need to convert this using DOS-style short mode. If the path
44062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44063  # take no chances and rewrite it.
44064  # Note: m4 eats our [], so we need to use [ and ] instead.
44065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44066  if test "x$has_forbidden_chars" != x; then
44067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44071      # Going to short mode and back again did indeed matter. Since short mode is
44072      # case insensitive, let's make it lowercase to improve readability.
44073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44074      # Now convert it back to Unix-style (cygpath)
44075      input_path=`$CYGPATH -u "$shortmode_path"`
44076      new_path="$input_path"
44077    fi
44078  fi
44079
44080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44081  if test "x$test_cygdrive_prefix" = x; then
44082    # As a simple fix, exclude /usr/bin since it's not a real path.
44083    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44085      # a path prefixed by /cygdrive for fixpath to work.
44086      new_path="$CYGWIN_ROOT_PATH$input_path"
44087    fi
44088  fi
44089
44090  # remove trailing .exe if any
44091  new_path="${new_path/%.exe/}"
44092
44093    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44094
44095  # First separate the path from the arguments. This will split at the first
44096  # space.
44097  complete="$BUILD_CXX"
44098  path="${complete%% *}"
44099  tmp="$complete EOL"
44100  arguments="${tmp#* }"
44101
44102  # Input might be given as Windows format, start by converting to
44103  # unix format.
44104  new_path="$path"
44105
44106  windows_path="$new_path"
44107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44108    unix_path=`$CYGPATH -u "$windows_path"`
44109    new_path="$unix_path"
44110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44112    new_path="$unix_path"
44113  fi
44114
44115
44116  # Now try to locate executable using which
44117  new_path=`$WHICH "$new_path" 2> /dev/null`
44118
44119  if test "x$new_path" = x; then
44120    # Oops. Which didn't find the executable.
44121    # The splitting of arguments from the executable at a space might have been incorrect,
44122    # since paths with space are more likely in Windows. Give it another try with the whole
44123    # argument.
44124    path="$complete"
44125    arguments="EOL"
44126    new_path="$path"
44127
44128  windows_path="$new_path"
44129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44130    unix_path=`$CYGPATH -u "$windows_path"`
44131    new_path="$unix_path"
44132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44134    new_path="$unix_path"
44135  fi
44136
44137
44138    new_path=`$WHICH "$new_path" 2> /dev/null`
44139    # bat and cmd files are not always considered executable in MSYS causing which
44140    # to not find them
44141    if test "x$new_path" = x \
44142        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44143        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44144      new_path="$path"
44145
44146  windows_path="$new_path"
44147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44148    unix_path=`$CYGPATH -u "$windows_path"`
44149    new_path="$unix_path"
44150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44152    new_path="$unix_path"
44153  fi
44154
44155    fi
44156
44157    if test "x$new_path" = x; then
44158      # It's still not found. Now this is an unrecoverable error.
44159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44160$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44161      has_space=`$ECHO "$complete" | $GREP " "`
44162      if test "x$has_space" != x; then
44163        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44164$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44165      fi
44166      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44167    fi
44168  fi
44169
44170  # Now new_path has a complete unix path to the binary
44171  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44172    # Keep paths in /bin as-is, but remove trailing .exe if any
44173    new_path="${new_path/%.exe/}"
44174    # Do not save /bin paths to all_fixpath_prefixes!
44175  else
44176    # Not in mixed or Windows style, start by that.
44177    new_path=`cmd //c echo $new_path`
44178
44179  input_path="$new_path"
44180  # Check if we need to convert this using DOS-style short mode. If the path
44181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44182  # take no chances and rewrite it.
44183  # Note: m4 eats our [], so we need to use [ and ] instead.
44184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44185  if test "x$has_forbidden_chars" != x; then
44186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44188  fi
44189
44190    # Output is in $new_path
44191
44192  windows_path="$new_path"
44193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44194    unix_path=`$CYGPATH -u "$windows_path"`
44195    new_path="$unix_path"
44196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44198    new_path="$unix_path"
44199  fi
44200
44201    # remove trailing .exe if any
44202    new_path="${new_path/%.exe/}"
44203
44204    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44205    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44206  fi
44207
44208    else
44209      # We're on a unix platform. Hooray! :)
44210      # First separate the path from the arguments. This will split at the first
44211      # space.
44212      complete="$BUILD_CXX"
44213      path="${complete%% *}"
44214      tmp="$complete EOL"
44215      arguments="${tmp#* }"
44216
44217      # Cannot rely on the command "which" here since it doesn't always work.
44218      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44219      if test -z "$is_absolute_path"; then
44220        # Path to executable is not absolute. Find it.
44221        IFS_save="$IFS"
44222        IFS=:
44223        for p in $PATH; do
44224          if test -f "$p/$path" && test -x "$p/$path"; then
44225            new_path="$p/$path"
44226            break
44227          fi
44228        done
44229        IFS="$IFS_save"
44230      else
44231        # This is an absolute path, we can use it without further modifications.
44232        new_path="$path"
44233      fi
44234
44235      if test "x$new_path" = x; then
44236        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44237$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44238        has_space=`$ECHO "$complete" | $GREP " "`
44239        if test "x$has_space" != x; then
44240          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44241$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44242        fi
44243        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44244      fi
44245    fi
44246
44247    # Now join together the path and the arguments once again
44248    if test "x$arguments" != xEOL; then
44249      new_complete="$new_path ${arguments% *}"
44250    else
44251      new_complete="$new_path"
44252    fi
44253
44254    if test "x$complete" != "x$new_complete"; then
44255      BUILD_CXX="$new_complete"
44256      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44257$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44258    fi
44259  fi
44260
44261
44262
44263  # Publish this variable in the help.
44264
44265
44266  if [ -z "${BUILD_NM+x}" ]; then
44267    # The variable is not set by user, try to locate tool using the code snippet
44268    for ac_prog in nm gcc-nm
44269do
44270  # Extract the first word of "$ac_prog", so it can be a program name with args.
44271set dummy $ac_prog; ac_word=$2
44272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44273$as_echo_n "checking for $ac_word... " >&6; }
44274if ${ac_cv_path_BUILD_NM+:} false; then :
44275  $as_echo_n "(cached) " >&6
44276else
44277  case $BUILD_NM in
44278  [\\/]* | ?:[\\/]*)
44279  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44280  ;;
44281  *)
44282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44283for as_dir in $PATH
44284do
44285  IFS=$as_save_IFS
44286  test -z "$as_dir" && as_dir=.
44287    for ac_exec_ext in '' $ac_executable_extensions; do
44288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44289    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44291    break 2
44292  fi
44293done
44294  done
44295IFS=$as_save_IFS
44296
44297  ;;
44298esac
44299fi
44300BUILD_NM=$ac_cv_path_BUILD_NM
44301if test -n "$BUILD_NM"; then
44302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44303$as_echo "$BUILD_NM" >&6; }
44304else
44305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44306$as_echo "no" >&6; }
44307fi
44308
44309
44310  test -n "$BUILD_NM" && break
44311done
44312
44313  else
44314    # The variable is set, but is it from the command line or the environment?
44315
44316    # Try to remove the string !BUILD_NM! from our list.
44317    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44318    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44319      # If it failed, the variable was not from the command line. Ignore it,
44320      # but warn the user (except for BASH, which is always set by the calling BASH).
44321      if test "xBUILD_NM" != xBASH; then
44322        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44323$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44324      fi
44325      # Try to locate tool using the code snippet
44326      for ac_prog in nm gcc-nm
44327do
44328  # Extract the first word of "$ac_prog", so it can be a program name with args.
44329set dummy $ac_prog; ac_word=$2
44330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44331$as_echo_n "checking for $ac_word... " >&6; }
44332if ${ac_cv_path_BUILD_NM+:} false; then :
44333  $as_echo_n "(cached) " >&6
44334else
44335  case $BUILD_NM in
44336  [\\/]* | ?:[\\/]*)
44337  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44338  ;;
44339  *)
44340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44341for as_dir in $PATH
44342do
44343  IFS=$as_save_IFS
44344  test -z "$as_dir" && as_dir=.
44345    for ac_exec_ext in '' $ac_executable_extensions; do
44346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44347    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44349    break 2
44350  fi
44351done
44352  done
44353IFS=$as_save_IFS
44354
44355  ;;
44356esac
44357fi
44358BUILD_NM=$ac_cv_path_BUILD_NM
44359if test -n "$BUILD_NM"; then
44360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44361$as_echo "$BUILD_NM" >&6; }
44362else
44363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44364$as_echo "no" >&6; }
44365fi
44366
44367
44368  test -n "$BUILD_NM" && break
44369done
44370
44371    else
44372      # If it succeeded, then it was overridden by the user. We will use it
44373      # for the tool.
44374
44375      # First remove it from the list of overridden variables, so we can test
44376      # for unknown variables in the end.
44377      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44378
44379      # Check if we try to supply an empty value
44380      if test "x$BUILD_NM" = x; then
44381        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44382$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44383        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44384$as_echo_n "checking for BUILD_NM... " >&6; }
44385        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44386$as_echo "disabled" >&6; }
44387      else
44388        # Check if the provided tool contains a complete path.
44389        tool_specified="$BUILD_NM"
44390        tool_basename="${tool_specified##*/}"
44391        if test "x$tool_basename" = "x$tool_specified"; then
44392          # A command without a complete path is provided, search $PATH.
44393          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44394$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44395          # Extract the first word of "$tool_basename", so it can be a program name with args.
44396set dummy $tool_basename; ac_word=$2
44397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44398$as_echo_n "checking for $ac_word... " >&6; }
44399if ${ac_cv_path_BUILD_NM+:} false; then :
44400  $as_echo_n "(cached) " >&6
44401else
44402  case $BUILD_NM in
44403  [\\/]* | ?:[\\/]*)
44404  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44405  ;;
44406  *)
44407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44408for as_dir in $PATH
44409do
44410  IFS=$as_save_IFS
44411  test -z "$as_dir" && as_dir=.
44412    for ac_exec_ext in '' $ac_executable_extensions; do
44413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44414    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44416    break 2
44417  fi
44418done
44419  done
44420IFS=$as_save_IFS
44421
44422  ;;
44423esac
44424fi
44425BUILD_NM=$ac_cv_path_BUILD_NM
44426if test -n "$BUILD_NM"; then
44427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44428$as_echo "$BUILD_NM" >&6; }
44429else
44430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44431$as_echo "no" >&6; }
44432fi
44433
44434
44435          if test "x$BUILD_NM" = x; then
44436            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44437          fi
44438        else
44439          # Otherwise we believe it is a complete path. Use it as it is.
44440          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44441$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44442          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44443$as_echo_n "checking for BUILD_NM... " >&6; }
44444          if test ! -x "$tool_specified"; then
44445            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44446$as_echo "not found" >&6; }
44447            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44448          fi
44449          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44450$as_echo "$tool_specified" >&6; }
44451        fi
44452      fi
44453    fi
44454
44455  fi
44456
44457
44458
44459  # Only process if variable expands to non-empty
44460
44461  if test "x$BUILD_NM" != x; then
44462    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44463
44464  # First separate the path from the arguments. This will split at the first
44465  # space.
44466  complete="$BUILD_NM"
44467  path="${complete%% *}"
44468  tmp="$complete EOL"
44469  arguments="${tmp#* }"
44470
44471  # Input might be given as Windows format, start by converting to
44472  # unix format.
44473  new_path=`$CYGPATH -u "$path"`
44474
44475  # Now try to locate executable using which
44476  new_path=`$WHICH "$new_path" 2> /dev/null`
44477  # bat and cmd files are not always considered executable in cygwin causing which
44478  # to not find them
44479  if test "x$new_path" = x \
44480      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44481      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44482    new_path=`$CYGPATH -u "$path"`
44483  fi
44484  if test "x$new_path" = x; then
44485    # Oops. Which didn't find the executable.
44486    # The splitting of arguments from the executable at a space might have been incorrect,
44487    # since paths with space are more likely in Windows. Give it another try with the whole
44488    # argument.
44489    path="$complete"
44490    arguments="EOL"
44491    new_path=`$CYGPATH -u "$path"`
44492    new_path=`$WHICH "$new_path" 2> /dev/null`
44493    # bat and cmd files are not always considered executable in cygwin causing which
44494    # to not find them
44495    if test "x$new_path" = x \
44496        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44497        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44498      new_path=`$CYGPATH -u "$path"`
44499    fi
44500    if test "x$new_path" = x; then
44501      # It's still not found. Now this is an unrecoverable error.
44502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44503$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44504      has_space=`$ECHO "$complete" | $GREP " "`
44505      if test "x$has_space" != x; then
44506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44508      fi
44509      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44510    fi
44511  fi
44512
44513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44516  # "foo.exe" is OK but "foo" is an error.
44517  #
44518  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44519  # It is also a way to make sure we got the proper file name for the real test later on.
44520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44521  if test "x$test_shortpath" = x; then
44522    # Short path failed, file does not exist as specified.
44523    # Try adding .exe or .cmd
44524    if test -f "${new_path}.exe"; then
44525      input_to_shortpath="${new_path}.exe"
44526    elif test -f "${new_path}.cmd"; then
44527      input_to_shortpath="${new_path}.cmd"
44528    else
44529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44530$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44531      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44532$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44533      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44534    fi
44535  else
44536    input_to_shortpath="$new_path"
44537  fi
44538
44539  # Call helper function which possibly converts this using DOS-style short mode.
44540  # If so, the updated path is stored in $new_path.
44541  new_path="$input_to_shortpath"
44542
44543  input_path="$input_to_shortpath"
44544  # Check if we need to convert this using DOS-style short mode. If the path
44545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44546  # take no chances and rewrite it.
44547  # Note: m4 eats our [], so we need to use [ and ] instead.
44548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44549  if test "x$has_forbidden_chars" != x; then
44550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44551    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44552    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44553    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44554      # Going to short mode and back again did indeed matter. Since short mode is
44555      # case insensitive, let's make it lowercase to improve readability.
44556      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44557      # Now convert it back to Unix-style (cygpath)
44558      input_path=`$CYGPATH -u "$shortmode_path"`
44559      new_path="$input_path"
44560    fi
44561  fi
44562
44563  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44564  if test "x$test_cygdrive_prefix" = x; then
44565    # As a simple fix, exclude /usr/bin since it's not a real path.
44566    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44567      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44568      # a path prefixed by /cygdrive for fixpath to work.
44569      new_path="$CYGWIN_ROOT_PATH$input_path"
44570    fi
44571  fi
44572
44573  # remove trailing .exe if any
44574  new_path="${new_path/%.exe/}"
44575
44576    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44577
44578  # First separate the path from the arguments. This will split at the first
44579  # space.
44580  complete="$BUILD_NM"
44581  path="${complete%% *}"
44582  tmp="$complete EOL"
44583  arguments="${tmp#* }"
44584
44585  # Input might be given as Windows format, start by converting to
44586  # unix format.
44587  new_path="$path"
44588
44589  windows_path="$new_path"
44590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44591    unix_path=`$CYGPATH -u "$windows_path"`
44592    new_path="$unix_path"
44593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44595    new_path="$unix_path"
44596  fi
44597
44598
44599  # Now try to locate executable using which
44600  new_path=`$WHICH "$new_path" 2> /dev/null`
44601
44602  if test "x$new_path" = x; then
44603    # Oops. Which didn't find the executable.
44604    # The splitting of arguments from the executable at a space might have been incorrect,
44605    # since paths with space are more likely in Windows. Give it another try with the whole
44606    # argument.
44607    path="$complete"
44608    arguments="EOL"
44609    new_path="$path"
44610
44611  windows_path="$new_path"
44612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44613    unix_path=`$CYGPATH -u "$windows_path"`
44614    new_path="$unix_path"
44615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44617    new_path="$unix_path"
44618  fi
44619
44620
44621    new_path=`$WHICH "$new_path" 2> /dev/null`
44622    # bat and cmd files are not always considered executable in MSYS causing which
44623    # to not find them
44624    if test "x$new_path" = x \
44625        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44626        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44627      new_path="$path"
44628
44629  windows_path="$new_path"
44630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44631    unix_path=`$CYGPATH -u "$windows_path"`
44632    new_path="$unix_path"
44633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44635    new_path="$unix_path"
44636  fi
44637
44638    fi
44639
44640    if test "x$new_path" = x; then
44641      # It's still not found. Now this is an unrecoverable error.
44642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44643$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44644      has_space=`$ECHO "$complete" | $GREP " "`
44645      if test "x$has_space" != x; then
44646        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44647$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44648      fi
44649      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44650    fi
44651  fi
44652
44653  # Now new_path has a complete unix path to the binary
44654  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44655    # Keep paths in /bin as-is, but remove trailing .exe if any
44656    new_path="${new_path/%.exe/}"
44657    # Do not save /bin paths to all_fixpath_prefixes!
44658  else
44659    # Not in mixed or Windows style, start by that.
44660    new_path=`cmd //c echo $new_path`
44661
44662  input_path="$new_path"
44663  # Check if we need to convert this using DOS-style short mode. If the path
44664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44665  # take no chances and rewrite it.
44666  # Note: m4 eats our [], so we need to use [ and ] instead.
44667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44668  if test "x$has_forbidden_chars" != x; then
44669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44671  fi
44672
44673    # Output is in $new_path
44674
44675  windows_path="$new_path"
44676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44677    unix_path=`$CYGPATH -u "$windows_path"`
44678    new_path="$unix_path"
44679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44681    new_path="$unix_path"
44682  fi
44683
44684    # remove trailing .exe if any
44685    new_path="${new_path/%.exe/}"
44686
44687    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44688    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44689  fi
44690
44691    else
44692      # We're on a unix platform. Hooray! :)
44693      # First separate the path from the arguments. This will split at the first
44694      # space.
44695      complete="$BUILD_NM"
44696      path="${complete%% *}"
44697      tmp="$complete EOL"
44698      arguments="${tmp#* }"
44699
44700      # Cannot rely on the command "which" here since it doesn't always work.
44701      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44702      if test -z "$is_absolute_path"; then
44703        # Path to executable is not absolute. Find it.
44704        IFS_save="$IFS"
44705        IFS=:
44706        for p in $PATH; do
44707          if test -f "$p/$path" && test -x "$p/$path"; then
44708            new_path="$p/$path"
44709            break
44710          fi
44711        done
44712        IFS="$IFS_save"
44713      else
44714        # This is an absolute path, we can use it without further modifications.
44715        new_path="$path"
44716      fi
44717
44718      if test "x$new_path" = x; then
44719        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44720$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44721        has_space=`$ECHO "$complete" | $GREP " "`
44722        if test "x$has_space" != x; then
44723          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44724$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44725        fi
44726        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44727      fi
44728    fi
44729
44730    # Now join together the path and the arguments once again
44731    if test "x$arguments" != xEOL; then
44732      new_complete="$new_path ${arguments% *}"
44733    else
44734      new_complete="$new_path"
44735    fi
44736
44737    if test "x$complete" != "x$new_complete"; then
44738      BUILD_NM="$new_complete"
44739      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44740$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44741    fi
44742  fi
44743
44744
44745
44746  # Publish this variable in the help.
44747
44748
44749  if [ -z "${BUILD_AR+x}" ]; then
44750    # The variable is not set by user, try to locate tool using the code snippet
44751    for ac_prog in ar gcc-ar
44752do
44753  # Extract the first word of "$ac_prog", so it can be a program name with args.
44754set dummy $ac_prog; ac_word=$2
44755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44756$as_echo_n "checking for $ac_word... " >&6; }
44757if ${ac_cv_path_BUILD_AR+:} false; then :
44758  $as_echo_n "(cached) " >&6
44759else
44760  case $BUILD_AR in
44761  [\\/]* | ?:[\\/]*)
44762  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44763  ;;
44764  *)
44765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44766for as_dir in $PATH
44767do
44768  IFS=$as_save_IFS
44769  test -z "$as_dir" && as_dir=.
44770    for ac_exec_ext in '' $ac_executable_extensions; do
44771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44772    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44774    break 2
44775  fi
44776done
44777  done
44778IFS=$as_save_IFS
44779
44780  ;;
44781esac
44782fi
44783BUILD_AR=$ac_cv_path_BUILD_AR
44784if test -n "$BUILD_AR"; then
44785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44786$as_echo "$BUILD_AR" >&6; }
44787else
44788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44789$as_echo "no" >&6; }
44790fi
44791
44792
44793  test -n "$BUILD_AR" && break
44794done
44795
44796  else
44797    # The variable is set, but is it from the command line or the environment?
44798
44799    # Try to remove the string !BUILD_AR! from our list.
44800    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
44801    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44802      # If it failed, the variable was not from the command line. Ignore it,
44803      # but warn the user (except for BASH, which is always set by the calling BASH).
44804      if test "xBUILD_AR" != xBASH; then
44805        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
44806$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
44807      fi
44808      # Try to locate tool using the code snippet
44809      for ac_prog in ar gcc-ar
44810do
44811  # Extract the first word of "$ac_prog", so it can be a program name with args.
44812set dummy $ac_prog; ac_word=$2
44813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44814$as_echo_n "checking for $ac_word... " >&6; }
44815if ${ac_cv_path_BUILD_AR+:} false; then :
44816  $as_echo_n "(cached) " >&6
44817else
44818  case $BUILD_AR in
44819  [\\/]* | ?:[\\/]*)
44820  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44821  ;;
44822  *)
44823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44824for as_dir in $PATH
44825do
44826  IFS=$as_save_IFS
44827  test -z "$as_dir" && as_dir=.
44828    for ac_exec_ext in '' $ac_executable_extensions; do
44829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44830    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44832    break 2
44833  fi
44834done
44835  done
44836IFS=$as_save_IFS
44837
44838  ;;
44839esac
44840fi
44841BUILD_AR=$ac_cv_path_BUILD_AR
44842if test -n "$BUILD_AR"; then
44843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44844$as_echo "$BUILD_AR" >&6; }
44845else
44846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44847$as_echo "no" >&6; }
44848fi
44849
44850
44851  test -n "$BUILD_AR" && break
44852done
44853
44854    else
44855      # If it succeeded, then it was overridden by the user. We will use it
44856      # for the tool.
44857
44858      # First remove it from the list of overridden variables, so we can test
44859      # for unknown variables in the end.
44860      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44861
44862      # Check if we try to supply an empty value
44863      if test "x$BUILD_AR" = x; then
44864        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44865$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44866        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44867$as_echo_n "checking for BUILD_AR... " >&6; }
44868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44869$as_echo "disabled" >&6; }
44870      else
44871        # Check if the provided tool contains a complete path.
44872        tool_specified="$BUILD_AR"
44873        tool_basename="${tool_specified##*/}"
44874        if test "x$tool_basename" = "x$tool_specified"; then
44875          # A command without a complete path is provided, search $PATH.
44876          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44877$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44878          # Extract the first word of "$tool_basename", so it can be a program name with args.
44879set dummy $tool_basename; ac_word=$2
44880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44881$as_echo_n "checking for $ac_word... " >&6; }
44882if ${ac_cv_path_BUILD_AR+:} false; then :
44883  $as_echo_n "(cached) " >&6
44884else
44885  case $BUILD_AR in
44886  [\\/]* | ?:[\\/]*)
44887  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44888  ;;
44889  *)
44890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44891for as_dir in $PATH
44892do
44893  IFS=$as_save_IFS
44894  test -z "$as_dir" && as_dir=.
44895    for ac_exec_ext in '' $ac_executable_extensions; do
44896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44897    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44899    break 2
44900  fi
44901done
44902  done
44903IFS=$as_save_IFS
44904
44905  ;;
44906esac
44907fi
44908BUILD_AR=$ac_cv_path_BUILD_AR
44909if test -n "$BUILD_AR"; then
44910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44911$as_echo "$BUILD_AR" >&6; }
44912else
44913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44914$as_echo "no" >&6; }
44915fi
44916
44917
44918          if test "x$BUILD_AR" = x; then
44919            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44920          fi
44921        else
44922          # Otherwise we believe it is a complete path. Use it as it is.
44923          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44924$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44925          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44926$as_echo_n "checking for BUILD_AR... " >&6; }
44927          if test ! -x "$tool_specified"; then
44928            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44929$as_echo "not found" >&6; }
44930            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44931          fi
44932          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44933$as_echo "$tool_specified" >&6; }
44934        fi
44935      fi
44936    fi
44937
44938  fi
44939
44940
44941
44942  # Only process if variable expands to non-empty
44943
44944  if test "x$BUILD_AR" != x; then
44945    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44946
44947  # First separate the path from the arguments. This will split at the first
44948  # space.
44949  complete="$BUILD_AR"
44950  path="${complete%% *}"
44951  tmp="$complete EOL"
44952  arguments="${tmp#* }"
44953
44954  # Input might be given as Windows format, start by converting to
44955  # unix format.
44956  new_path=`$CYGPATH -u "$path"`
44957
44958  # Now try to locate executable using which
44959  new_path=`$WHICH "$new_path" 2> /dev/null`
44960  # bat and cmd files are not always considered executable in cygwin causing which
44961  # to not find them
44962  if test "x$new_path" = x \
44963      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44964      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44965    new_path=`$CYGPATH -u "$path"`
44966  fi
44967  if test "x$new_path" = x; then
44968    # Oops. Which didn't find the executable.
44969    # The splitting of arguments from the executable at a space might have been incorrect,
44970    # since paths with space are more likely in Windows. Give it another try with the whole
44971    # argument.
44972    path="$complete"
44973    arguments="EOL"
44974    new_path=`$CYGPATH -u "$path"`
44975    new_path=`$WHICH "$new_path" 2> /dev/null`
44976    # bat and cmd files are not always considered executable in cygwin causing which
44977    # to not find them
44978    if test "x$new_path" = x \
44979        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44980        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44981      new_path=`$CYGPATH -u "$path"`
44982    fi
44983    if test "x$new_path" = x; then
44984      # It's still not found. Now this is an unrecoverable error.
44985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44986$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44987      has_space=`$ECHO "$complete" | $GREP " "`
44988      if test "x$has_space" != x; then
44989        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44990$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44991      fi
44992      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44993    fi
44994  fi
44995
44996  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44997  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44998  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44999  # "foo.exe" is OK but "foo" is an error.
45000  #
45001  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45002  # It is also a way to make sure we got the proper file name for the real test later on.
45003  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45004  if test "x$test_shortpath" = x; then
45005    # Short path failed, file does not exist as specified.
45006    # Try adding .exe or .cmd
45007    if test -f "${new_path}.exe"; then
45008      input_to_shortpath="${new_path}.exe"
45009    elif test -f "${new_path}.cmd"; then
45010      input_to_shortpath="${new_path}.cmd"
45011    else
45012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45013$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45014      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45015$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45016      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45017    fi
45018  else
45019    input_to_shortpath="$new_path"
45020  fi
45021
45022  # Call helper function which possibly converts this using DOS-style short mode.
45023  # If so, the updated path is stored in $new_path.
45024  new_path="$input_to_shortpath"
45025
45026  input_path="$input_to_shortpath"
45027  # Check if we need to convert this using DOS-style short mode. If the path
45028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45029  # take no chances and rewrite it.
45030  # Note: m4 eats our [], so we need to use [ and ] instead.
45031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45032  if test "x$has_forbidden_chars" != x; then
45033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45037      # Going to short mode and back again did indeed matter. Since short mode is
45038      # case insensitive, let's make it lowercase to improve readability.
45039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45040      # Now convert it back to Unix-style (cygpath)
45041      input_path=`$CYGPATH -u "$shortmode_path"`
45042      new_path="$input_path"
45043    fi
45044  fi
45045
45046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45047  if test "x$test_cygdrive_prefix" = x; then
45048    # As a simple fix, exclude /usr/bin since it's not a real path.
45049    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45051      # a path prefixed by /cygdrive for fixpath to work.
45052      new_path="$CYGWIN_ROOT_PATH$input_path"
45053    fi
45054  fi
45055
45056  # remove trailing .exe if any
45057  new_path="${new_path/%.exe/}"
45058
45059    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45060
45061  # First separate the path from the arguments. This will split at the first
45062  # space.
45063  complete="$BUILD_AR"
45064  path="${complete%% *}"
45065  tmp="$complete EOL"
45066  arguments="${tmp#* }"
45067
45068  # Input might be given as Windows format, start by converting to
45069  # unix format.
45070  new_path="$path"
45071
45072  windows_path="$new_path"
45073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45074    unix_path=`$CYGPATH -u "$windows_path"`
45075    new_path="$unix_path"
45076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45078    new_path="$unix_path"
45079  fi
45080
45081
45082  # Now try to locate executable using which
45083  new_path=`$WHICH "$new_path" 2> /dev/null`
45084
45085  if test "x$new_path" = x; then
45086    # Oops. Which didn't find the executable.
45087    # The splitting of arguments from the executable at a space might have been incorrect,
45088    # since paths with space are more likely in Windows. Give it another try with the whole
45089    # argument.
45090    path="$complete"
45091    arguments="EOL"
45092    new_path="$path"
45093
45094  windows_path="$new_path"
45095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45096    unix_path=`$CYGPATH -u "$windows_path"`
45097    new_path="$unix_path"
45098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45100    new_path="$unix_path"
45101  fi
45102
45103
45104    new_path=`$WHICH "$new_path" 2> /dev/null`
45105    # bat and cmd files are not always considered executable in MSYS causing which
45106    # to not find them
45107    if test "x$new_path" = x \
45108        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45109        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45110      new_path="$path"
45111
45112  windows_path="$new_path"
45113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45114    unix_path=`$CYGPATH -u "$windows_path"`
45115    new_path="$unix_path"
45116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45118    new_path="$unix_path"
45119  fi
45120
45121    fi
45122
45123    if test "x$new_path" = x; then
45124      # It's still not found. Now this is an unrecoverable error.
45125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45126$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45127      has_space=`$ECHO "$complete" | $GREP " "`
45128      if test "x$has_space" != x; then
45129        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45130$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45131      fi
45132      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45133    fi
45134  fi
45135
45136  # Now new_path has a complete unix path to the binary
45137  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45138    # Keep paths in /bin as-is, but remove trailing .exe if any
45139    new_path="${new_path/%.exe/}"
45140    # Do not save /bin paths to all_fixpath_prefixes!
45141  else
45142    # Not in mixed or Windows style, start by that.
45143    new_path=`cmd //c echo $new_path`
45144
45145  input_path="$new_path"
45146  # Check if we need to convert this using DOS-style short mode. If the path
45147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45148  # take no chances and rewrite it.
45149  # Note: m4 eats our [], so we need to use [ and ] instead.
45150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45151  if test "x$has_forbidden_chars" != x; then
45152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45154  fi
45155
45156    # Output is in $new_path
45157
45158  windows_path="$new_path"
45159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45160    unix_path=`$CYGPATH -u "$windows_path"`
45161    new_path="$unix_path"
45162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45164    new_path="$unix_path"
45165  fi
45166
45167    # remove trailing .exe if any
45168    new_path="${new_path/%.exe/}"
45169
45170    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45171    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45172  fi
45173
45174    else
45175      # We're on a unix platform. Hooray! :)
45176      # First separate the path from the arguments. This will split at the first
45177      # space.
45178      complete="$BUILD_AR"
45179      path="${complete%% *}"
45180      tmp="$complete EOL"
45181      arguments="${tmp#* }"
45182
45183      # Cannot rely on the command "which" here since it doesn't always work.
45184      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45185      if test -z "$is_absolute_path"; then
45186        # Path to executable is not absolute. Find it.
45187        IFS_save="$IFS"
45188        IFS=:
45189        for p in $PATH; do
45190          if test -f "$p/$path" && test -x "$p/$path"; then
45191            new_path="$p/$path"
45192            break
45193          fi
45194        done
45195        IFS="$IFS_save"
45196      else
45197        # This is an absolute path, we can use it without further modifications.
45198        new_path="$path"
45199      fi
45200
45201      if test "x$new_path" = x; then
45202        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45203$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45204        has_space=`$ECHO "$complete" | $GREP " "`
45205        if test "x$has_space" != x; then
45206          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45207$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45208        fi
45209        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45210      fi
45211    fi
45212
45213    # Now join together the path and the arguments once again
45214    if test "x$arguments" != xEOL; then
45215      new_complete="$new_path ${arguments% *}"
45216    else
45217      new_complete="$new_path"
45218    fi
45219
45220    if test "x$complete" != "x$new_complete"; then
45221      BUILD_AR="$new_complete"
45222      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45223$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45224    fi
45225  fi
45226
45227    # Assume the C compiler is the assembler
45228    BUILD_AS="$BUILD_CC -c"
45229    # Just like for the target compiler, use the compiler as linker
45230    BUILD_LD="$BUILD_CC"
45231    BUILD_LDCXX="$BUILD_CXX"
45232
45233    PATH="$OLDPATH"
45234  else
45235    # If we are not cross compiling, use the normal target compilers for
45236    # building the build platform executables.
45237    BUILD_CC="$CC"
45238    BUILD_CXX="$CXX"
45239    BUILD_LD="$LD"
45240    BUILD_LDCXX="$LDCXX"
45241    BUILD_NM="$NM"
45242    BUILD_AS="$AS"
45243    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
45244    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
45245    BUILD_AR="$AR"
45246  fi
45247
45248
45249
45250
45251
45252
45253
45254
45255
45256
45257
45258
45259  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45260    # For hotspot, we need these in Windows mixed path,
45261    # so rewrite them all. Need added .exe suffix.
45262    HOTSPOT_CXX="$CXX.exe"
45263    HOTSPOT_LD="$LD.exe"
45264    HOTSPOT_MT="$MT.exe"
45265    HOTSPOT_RC="$RC.exe"
45266
45267  unix_path="$HOTSPOT_CXX"
45268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45269    windows_path=`$CYGPATH -m "$unix_path"`
45270    HOTSPOT_CXX="$windows_path"
45271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45272    windows_path=`cmd //c echo $unix_path`
45273    HOTSPOT_CXX="$windows_path"
45274  fi
45275
45276
45277  unix_path="$HOTSPOT_LD"
45278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45279    windows_path=`$CYGPATH -m "$unix_path"`
45280    HOTSPOT_LD="$windows_path"
45281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45282    windows_path=`cmd //c echo $unix_path`
45283    HOTSPOT_LD="$windows_path"
45284  fi
45285
45286
45287  unix_path="$HOTSPOT_MT"
45288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45289    windows_path=`$CYGPATH -m "$unix_path"`
45290    HOTSPOT_MT="$windows_path"
45291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45292    windows_path=`cmd //c echo $unix_path`
45293    HOTSPOT_MT="$windows_path"
45294  fi
45295
45296
45297  unix_path="$HOTSPOT_RC"
45298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45299    windows_path=`$CYGPATH -m "$unix_path"`
45300    HOTSPOT_RC="$windows_path"
45301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45302    windows_path=`cmd //c echo $unix_path`
45303    HOTSPOT_RC="$windows_path"
45304  fi
45305
45306
45307
45308  else
45309    HOTSPOT_CXX="$CXX"
45310    HOTSPOT_LD="$LD"
45311  fi
45312
45313
45314
45315  if test  "x$TOOLCHAIN_TYPE" = xclang; then
45316    USE_CLANG=true
45317  fi
45318
45319
45320
45321
45322
45323  # The package path is used only on macosx?
45324  # FIXME: clean this up, and/or move it elsewhere.
45325  PACKAGE_PATH=/opt/local
45326
45327
45328  # Check for extra potential brokenness.
45329  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45330    # On Windows, double-check that we got the right compiler.
45331    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
45332    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
45333    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
45334      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
45335        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
45336      fi
45337    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
45338      if test "x$COMPILER_CPU_TEST" != "xx64"; then
45339        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
45340      fi
45341    fi
45342  fi
45343
45344  if test "x$TOOLCHAIN_TYPE" = xgcc; then
45345    # If this is a --hash-style=gnu system, use --hash-style=both, why?
45346    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
45347    # This is later checked when setting flags.
45348
45349    # "-Og" suppported for GCC 4.8 and later
45350    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
45351
45352  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
45353$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
45354  supports=yes
45355
45356  saved_cflags="$CFLAGS"
45357  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
45358  ac_ext=c
45359ac_cpp='$CPP $CPPFLAGS'
45360ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45361ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45362ac_compiler_gnu=$ac_cv_c_compiler_gnu
45363
45364  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45365/* end confdefs.h.  */
45366int i;
45367_ACEOF
45368if ac_fn_c_try_compile "$LINENO"; then :
45369
45370else
45371  supports=no
45372fi
45373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45374  ac_ext=cpp
45375ac_cpp='$CXXCPP $CPPFLAGS'
45376ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45377ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45378ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45379
45380  CFLAGS="$saved_cflags"
45381
45382  saved_cxxflags="$CXXFLAGS"
45383  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
45384  ac_ext=cpp
45385ac_cpp='$CXXCPP $CPPFLAGS'
45386ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45387ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45388ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45389
45390  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45391/* end confdefs.h.  */
45392int i;
45393_ACEOF
45394if ac_fn_cxx_try_compile "$LINENO"; then :
45395
45396else
45397  supports=no
45398fi
45399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45400  ac_ext=cpp
45401ac_cpp='$CXXCPP $CPPFLAGS'
45402ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45403ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45404ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45405
45406  CXXFLAGS="$saved_cxxflags"
45407
45408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45409$as_echo "$supports" >&6; }
45410  if test "x$supports" = "xyes" ; then
45411    HAS_CFLAG_OPTIMIZE_DEBUG=true
45412  else
45413    HAS_CFLAG_OPTIMIZE_DEBUG=false
45414  fi
45415
45416
45417    # "-z relro" supported in GNU binutils 2.17 and later
45418    LINKER_RELRO_FLAG="-Wl,-z,relro"
45419
45420  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
45421$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
45422  supports=yes
45423
45424  saved_ldflags="$LDFLAGS"
45425  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
45426  ac_ext=c
45427ac_cpp='$CPP $CPPFLAGS'
45428ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45429ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45430ac_compiler_gnu=$ac_cv_c_compiler_gnu
45431
45432  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45433/* end confdefs.h.  */
45434
45435int
45436main ()
45437{
45438
45439  ;
45440  return 0;
45441}
45442_ACEOF
45443if ac_fn_c_try_link "$LINENO"; then :
45444
45445else
45446  supports=no
45447fi
45448rm -f core conftest.err conftest.$ac_objext \
45449    conftest$ac_exeext conftest.$ac_ext
45450  ac_ext=cpp
45451ac_cpp='$CXXCPP $CPPFLAGS'
45452ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45453ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45454ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45455
45456  LDFLAGS="$saved_ldflags"
45457
45458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45459$as_echo "$supports" >&6; }
45460  if test "x$supports" = "xyes" ; then
45461    HAS_LINKER_RELRO=true
45462  else
45463    HAS_LINKER_RELRO=false
45464  fi
45465
45466
45467    # "-z now" supported in GNU binutils 2.11 and later
45468    LINKER_NOW_FLAG="-Wl,-z,now"
45469
45470  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
45471$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
45472  supports=yes
45473
45474  saved_ldflags="$LDFLAGS"
45475  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
45476  ac_ext=c
45477ac_cpp='$CPP $CPPFLAGS'
45478ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45479ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45480ac_compiler_gnu=$ac_cv_c_compiler_gnu
45481
45482  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45483/* end confdefs.h.  */
45484
45485int
45486main ()
45487{
45488
45489  ;
45490  return 0;
45491}
45492_ACEOF
45493if ac_fn_c_try_link "$LINENO"; then :
45494
45495else
45496  supports=no
45497fi
45498rm -f core conftest.err conftest.$ac_objext \
45499    conftest$ac_exeext conftest.$ac_ext
45500  ac_ext=cpp
45501ac_cpp='$CXXCPP $CPPFLAGS'
45502ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45503ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45504ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45505
45506  LDFLAGS="$saved_ldflags"
45507
45508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45509$as_echo "$supports" >&6; }
45510  if test "x$supports" = "xyes" ; then
45511    HAS_LINKER_NOW=true
45512  else
45513    HAS_LINKER_NOW=false
45514  fi
45515
45516  fi
45517
45518  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
45519  # in executable.'
45520  USING_BROKEN_SUSE_LD=no
45521  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
45522    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
45523$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
45524    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
45525    $ECHO "int main() { }" > main.c
45526    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
45527      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45528$as_echo "no" >&6; }
45529      USING_BROKEN_SUSE_LD=no
45530    else
45531      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45532$as_echo "yes" >&6; }
45533      USING_BROKEN_SUSE_LD=yes
45534    fi
45535    rm -rf version-script.map main.c a.out
45536  fi
45537
45538
45539
45540# Setup the JTReg Regression Test Harness.
45541
45542
45543# Check whether --with-jtreg was given.
45544if test "${with_jtreg+set}" = set; then :
45545  withval=$with_jtreg;
45546else
45547  with_jtreg=no
45548fi
45549
45550
45551  if test "x$with_jtreg" = xno; then
45552    # jtreg disabled
45553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45554$as_echo_n "checking for jtreg... " >&6; }
45555    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45556$as_echo "no" >&6; }
45557  else
45558    if test "x$with_jtreg" != xyes; then
45559      # with path specified.
45560      JT_HOME="$with_jtreg"
45561    fi
45562
45563    if test "x$JT_HOME" != x; then
45564      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45565$as_echo_n "checking for jtreg... " >&6; }
45566
45567      # use JT_HOME enviroment var.
45568
45569  # Only process if variable expands to non-empty
45570
45571  if test "x$JT_HOME" != x; then
45572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45573
45574  # Input might be given as Windows format, start by converting to
45575  # unix format.
45576  path="$JT_HOME"
45577  new_path=`$CYGPATH -u "$path"`
45578
45579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45582  # "foo.exe" is OK but "foo" is an error.
45583  #
45584  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45585  # It is also a way to make sure we got the proper file name for the real test later on.
45586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45587  if test "x$test_shortpath" = x; then
45588    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45589$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45590    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
45591  fi
45592
45593  # Call helper function which possibly converts this using DOS-style short mode.
45594  # If so, the updated path is stored in $new_path.
45595
45596  input_path="$new_path"
45597  # Check if we need to convert this using DOS-style short mode. If the path
45598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45599  # take no chances and rewrite it.
45600  # Note: m4 eats our [], so we need to use [ and ] instead.
45601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45602  if test "x$has_forbidden_chars" != x; then
45603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45607      # Going to short mode and back again did indeed matter. Since short mode is
45608      # case insensitive, let's make it lowercase to improve readability.
45609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45610      # Now convert it back to Unix-style (cygpath)
45611      input_path=`$CYGPATH -u "$shortmode_path"`
45612      new_path="$input_path"
45613    fi
45614  fi
45615
45616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45617  if test "x$test_cygdrive_prefix" = x; then
45618    # As a simple fix, exclude /usr/bin since it's not a real path.
45619    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45621      # a path prefixed by /cygdrive for fixpath to work.
45622      new_path="$CYGWIN_ROOT_PATH$input_path"
45623    fi
45624  fi
45625
45626
45627  if test "x$path" != "x$new_path"; then
45628    JT_HOME="$new_path"
45629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45630$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45631  fi
45632
45633    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45634
45635  path="$JT_HOME"
45636  has_colon=`$ECHO $path | $GREP ^.:`
45637  new_path="$path"
45638  if test "x$has_colon" = x; then
45639    # Not in mixed or Windows style, start by that.
45640    new_path=`cmd //c echo $path`
45641  fi
45642
45643
45644  input_path="$new_path"
45645  # Check if we need to convert this using DOS-style short mode. If the path
45646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45647  # take no chances and rewrite it.
45648  # Note: m4 eats our [], so we need to use [ and ] instead.
45649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45650  if test "x$has_forbidden_chars" != x; then
45651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45652    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45653  fi
45654
45655
45656  windows_path="$new_path"
45657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45658    unix_path=`$CYGPATH -u "$windows_path"`
45659    new_path="$unix_path"
45660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45662    new_path="$unix_path"
45663  fi
45664
45665  if test "x$path" != "x$new_path"; then
45666    JT_HOME="$new_path"
45667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45668$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45669  fi
45670
45671  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45672  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45673
45674    else
45675      # We're on a unix platform. Hooray! :)
45676      path="$JT_HOME"
45677      has_space=`$ECHO "$path" | $GREP " "`
45678      if test "x$has_space" != x; then
45679        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45680$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45681        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45682      fi
45683
45684      # Use eval to expand a potential ~
45685      eval path="$path"
45686      if test ! -f "$path" && test ! -d "$path"; then
45687        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
45688      fi
45689
45690      if test -d "$path"; then
45691        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
45692      else
45693        dir="`$DIRNAME "$path"`"
45694        base="`$BASENAME "$path"`"
45695        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
45696      fi
45697    fi
45698  fi
45699
45700
45701      # jtreg win32 script works for everybody
45702      JTREGEXE="$JT_HOME/bin/jtreg"
45703
45704      if test ! -f "$JTREGEXE"; then
45705        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
45706      fi
45707
45708      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45709$as_echo "$JTREGEXE" >&6; }
45710    else
45711      # try to find jtreg on path
45712
45713
45714
45715  # Publish this variable in the help.
45716
45717
45718  if [ -z "${JTREGEXE+x}" ]; then
45719    # The variable is not set by user, try to locate tool using the code snippet
45720    for ac_prog in jtreg
45721do
45722  # Extract the first word of "$ac_prog", so it can be a program name with args.
45723set dummy $ac_prog; ac_word=$2
45724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45725$as_echo_n "checking for $ac_word... " >&6; }
45726if ${ac_cv_path_JTREGEXE+:} false; then :
45727  $as_echo_n "(cached) " >&6
45728else
45729  case $JTREGEXE in
45730  [\\/]* | ?:[\\/]*)
45731  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45732  ;;
45733  *)
45734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45735for as_dir in $PATH
45736do
45737  IFS=$as_save_IFS
45738  test -z "$as_dir" && as_dir=.
45739    for ac_exec_ext in '' $ac_executable_extensions; do
45740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45741    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45743    break 2
45744  fi
45745done
45746  done
45747IFS=$as_save_IFS
45748
45749  ;;
45750esac
45751fi
45752JTREGEXE=$ac_cv_path_JTREGEXE
45753if test -n "$JTREGEXE"; then
45754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45755$as_echo "$JTREGEXE" >&6; }
45756else
45757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45758$as_echo "no" >&6; }
45759fi
45760
45761
45762  test -n "$JTREGEXE" && break
45763done
45764
45765  else
45766    # The variable is set, but is it from the command line or the environment?
45767
45768    # Try to remove the string !JTREGEXE! from our list.
45769    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
45770    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45771      # If it failed, the variable was not from the command line. Ignore it,
45772      # but warn the user (except for BASH, which is always set by the calling BASH).
45773      if test "xJTREGEXE" != xBASH; then
45774        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
45775$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
45776      fi
45777      # Try to locate tool using the code snippet
45778      for ac_prog in jtreg
45779do
45780  # Extract the first word of "$ac_prog", so it can be a program name with args.
45781set dummy $ac_prog; ac_word=$2
45782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45783$as_echo_n "checking for $ac_word... " >&6; }
45784if ${ac_cv_path_JTREGEXE+:} false; then :
45785  $as_echo_n "(cached) " >&6
45786else
45787  case $JTREGEXE in
45788  [\\/]* | ?:[\\/]*)
45789  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45790  ;;
45791  *)
45792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45793for as_dir in $PATH
45794do
45795  IFS=$as_save_IFS
45796  test -z "$as_dir" && as_dir=.
45797    for ac_exec_ext in '' $ac_executable_extensions; do
45798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45799    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45801    break 2
45802  fi
45803done
45804  done
45805IFS=$as_save_IFS
45806
45807  ;;
45808esac
45809fi
45810JTREGEXE=$ac_cv_path_JTREGEXE
45811if test -n "$JTREGEXE"; then
45812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45813$as_echo "$JTREGEXE" >&6; }
45814else
45815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45816$as_echo "no" >&6; }
45817fi
45818
45819
45820  test -n "$JTREGEXE" && break
45821done
45822
45823    else
45824      # If it succeeded, then it was overridden by the user. We will use it
45825      # for the tool.
45826
45827      # First remove it from the list of overridden variables, so we can test
45828      # for unknown variables in the end.
45829      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45830
45831      # Check if we try to supply an empty value
45832      if test "x$JTREGEXE" = x; then
45833        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
45834$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
45835        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45836$as_echo_n "checking for JTREGEXE... " >&6; }
45837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45838$as_echo "disabled" >&6; }
45839      else
45840        # Check if the provided tool contains a complete path.
45841        tool_specified="$JTREGEXE"
45842        tool_basename="${tool_specified##*/}"
45843        if test "x$tool_basename" = "x$tool_specified"; then
45844          # A command without a complete path is provided, search $PATH.
45845          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
45846$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
45847          # Extract the first word of "$tool_basename", so it can be a program name with args.
45848set dummy $tool_basename; ac_word=$2
45849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45850$as_echo_n "checking for $ac_word... " >&6; }
45851if ${ac_cv_path_JTREGEXE+:} false; then :
45852  $as_echo_n "(cached) " >&6
45853else
45854  case $JTREGEXE in
45855  [\\/]* | ?:[\\/]*)
45856  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45857  ;;
45858  *)
45859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45860for as_dir in $PATH
45861do
45862  IFS=$as_save_IFS
45863  test -z "$as_dir" && as_dir=.
45864    for ac_exec_ext in '' $ac_executable_extensions; do
45865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45866    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45868    break 2
45869  fi
45870done
45871  done
45872IFS=$as_save_IFS
45873
45874  ;;
45875esac
45876fi
45877JTREGEXE=$ac_cv_path_JTREGEXE
45878if test -n "$JTREGEXE"; then
45879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45880$as_echo "$JTREGEXE" >&6; }
45881else
45882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45883$as_echo "no" >&6; }
45884fi
45885
45886
45887          if test "x$JTREGEXE" = x; then
45888            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45889          fi
45890        else
45891          # Otherwise we believe it is a complete path. Use it as it is.
45892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
45893$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
45894          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45895$as_echo_n "checking for JTREGEXE... " >&6; }
45896          if test ! -x "$tool_specified"; then
45897            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45898$as_echo "not found" >&6; }
45899            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
45900          fi
45901          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45902$as_echo "$tool_specified" >&6; }
45903        fi
45904      fi
45905    fi
45906
45907  fi
45908
45909
45910
45911  if test "x$JTREGEXE" = x; then
45912    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
45913  fi
45914
45915
45916      JT_HOME="`$DIRNAME $JTREGEXE`"
45917    fi
45918  fi
45919
45920
45921
45922
45923
45924
45925  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
45926  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
45927  if test "x$TOOLCHAIN_TYPE" = xxlc; then
45928    COMPILER_TARGET_BITS_FLAG="-q"
45929    COMPILER_COMMAND_FILE_FLAG="-f"
45930  else
45931    COMPILER_TARGET_BITS_FLAG="-m"
45932    COMPILER_COMMAND_FILE_FLAG="@"
45933
45934    # The solstudio linker does not support @-files.
45935    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45936      COMPILER_COMMAND_FILE_FLAG=
45937    fi
45938
45939    # Check if @file is supported by gcc
45940    if test "x$TOOLCHAIN_TYPE" = xgcc; then
45941      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
45942$as_echo_n "checking if @file is supported by gcc... " >&6; }
45943      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
45944      $ECHO "" "--version" > command.file
45945      if $CXX @command.file 2>&5 >&5; then
45946        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45947$as_echo "yes" >&6; }
45948        COMPILER_COMMAND_FILE_FLAG="@"
45949      else
45950        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45951$as_echo "no" >&6; }
45952        COMPILER_COMMAND_FILE_FLAG=
45953      fi
45954      rm -rf command.file
45955    fi
45956  fi
45957
45958
45959
45960  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
45961  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45962    ARFLAGS="-r"
45963  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45964    ARFLAGS="-X64"
45965  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
45966    # lib.exe is used as AR to create static libraries.
45967    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
45968  else
45969    ARFLAGS=""
45970  fi
45971
45972
45973  ## Setup strip.
45974  # FIXME: should this really be per platform, or should it be per toolchain type?
45975  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
45976  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
45977  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45978    STRIPFLAGS="-g"
45979  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
45980    STRIPFLAGS="-x"
45981  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
45982    STRIPFLAGS="-S"
45983  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45984    STRIPFLAGS="-X32_64"
45985  fi
45986
45987
45988
45989  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45990    CC_OUT_OPTION=-Fo
45991    EXE_OUT_OPTION=-out:
45992    LD_OUT_OPTION=-out:
45993    AR_OUT_OPTION=-out:
45994  else
45995    # The option used to specify the target .o,.a or .so file.
45996    # When compiling, how to specify the to be created object file.
45997    CC_OUT_OPTION='-o$(SPACE)'
45998    # When linking, how to specify the to be created executable.
45999    EXE_OUT_OPTION='-o$(SPACE)'
46000    # When linking, how to specify the to be created dynamically linkable library.
46001    LD_OUT_OPTION='-o$(SPACE)'
46002    # When archiving, how to specify the to be create static archive for object files.
46003    AR_OUT_OPTION='rcs$(SPACE)'
46004  fi
46005
46006
46007
46008
46009
46010  # On Windows, we need to set RC flags.
46011  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46012    RC_FLAGS="-nologo -l0x409"
46013    if test "x$VARIANT" = xOPT; then
46014      RC_FLAGS="$RC_FLAGS -DNDEBUG"
46015    fi
46016
46017    # The version variables used to create RC_FLAGS may be overridden
46018    # in a custom configure script, or possibly the command line.
46019    # Let those variables be expanded at make time in spec.gmk.
46020    # The \$ are escaped to the shell, and the $(...) variables
46021    # are evaluated by make.
46022    RC_FLAGS="$RC_FLAGS \
46023        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
46024        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
46025        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
46026        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
46027        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
46028        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
46029        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
46030  fi
46031
46032
46033  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46034    # silence copyright notice and other headers.
46035    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
46036  fi
46037
46038
46039# FIXME: Currently we must test this after toolchain but before flags. Fix!
46040
46041# Now we can test some aspects on the target using configure macros.
46042
46043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
46044$as_echo_n "checking for ANSI C header files... " >&6; }
46045if ${ac_cv_header_stdc+:} false; then :
46046  $as_echo_n "(cached) " >&6
46047else
46048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46049/* end confdefs.h.  */
46050#include <stdlib.h>
46051#include <stdarg.h>
46052#include <string.h>
46053#include <float.h>
46054
46055int
46056main ()
46057{
46058
46059  ;
46060  return 0;
46061}
46062_ACEOF
46063if ac_fn_cxx_try_compile "$LINENO"; then :
46064  ac_cv_header_stdc=yes
46065else
46066  ac_cv_header_stdc=no
46067fi
46068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46069
46070if test $ac_cv_header_stdc = yes; then
46071  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
46072  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46073/* end confdefs.h.  */
46074#include <string.h>
46075
46076_ACEOF
46077if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
46078  $EGREP "memchr" >/dev/null 2>&1; then :
46079
46080else
46081  ac_cv_header_stdc=no
46082fi
46083rm -f conftest*
46084
46085fi
46086
46087if test $ac_cv_header_stdc = yes; then
46088  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
46089  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46090/* end confdefs.h.  */
46091#include <stdlib.h>
46092
46093_ACEOF
46094if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
46095  $EGREP "free" >/dev/null 2>&1; then :
46096
46097else
46098  ac_cv_header_stdc=no
46099fi
46100rm -f conftest*
46101
46102fi
46103
46104if test $ac_cv_header_stdc = yes; then
46105  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
46106  if test "$cross_compiling" = yes; then :
46107  :
46108else
46109  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46110/* end confdefs.h.  */
46111#include <ctype.h>
46112#include <stdlib.h>
46113#if ((' ' & 0x0FF) == 0x020)
46114# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
46115# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
46116#else
46117# define ISLOWER(c) \
46118		   (('a' <= (c) && (c) <= 'i') \
46119		     || ('j' <= (c) && (c) <= 'r') \
46120		     || ('s' <= (c) && (c) <= 'z'))
46121# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
46122#endif
46123
46124#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
46125int
46126main ()
46127{
46128  int i;
46129  for (i = 0; i < 256; i++)
46130    if (XOR (islower (i), ISLOWER (i))
46131	|| toupper (i) != TOUPPER (i))
46132      return 2;
46133  return 0;
46134}
46135_ACEOF
46136if ac_fn_cxx_try_run "$LINENO"; then :
46137
46138else
46139  ac_cv_header_stdc=no
46140fi
46141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46142  conftest.$ac_objext conftest.beam conftest.$ac_ext
46143fi
46144
46145fi
46146fi
46147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
46148$as_echo "$ac_cv_header_stdc" >&6; }
46149if test $ac_cv_header_stdc = yes; then
46150
46151$as_echo "#define STDC_HEADERS 1" >>confdefs.h
46152
46153fi
46154
46155# On IRIX 5.3, sys/types and inttypes.h are conflicting.
46156for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
46157		  inttypes.h stdint.h unistd.h
46158do :
46159  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
46160ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
46161"
46162if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
46163  cat >>confdefs.h <<_ACEOF
46164#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
46165_ACEOF
46166
46167fi
46168
46169done
46170
46171
46172
46173  ###############################################################################
46174  #
46175  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
46176  # (The JVM can use 32 or 64 bit Java pointers but that decision
46177  # is made at runtime.)
46178  #
46179
46180  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
46181    # Always specify -m flag on Solaris
46182    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
46183
46184  # When we add flags to the "official" CFLAGS etc, we need to
46185  # keep track of these additions in ADDED_CFLAGS etc. These
46186  # will later be checked to make sure only controlled additions
46187  # have been made to CFLAGS etc.
46188  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46189  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46190  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46191
46192  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46193  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46194  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46195
46196  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46197  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46198  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46199
46200  elif test "x$COMPILE_TYPE" = xreduced; then
46201    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
46202      # Specify -m if running reduced on unix platforms
46203
46204  # When we add flags to the "official" CFLAGS etc, we need to
46205  # keep track of these additions in ADDED_CFLAGS etc. These
46206  # will later be checked to make sure only controlled additions
46207  # have been made to CFLAGS etc.
46208  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46209  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46210  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46211
46212  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46213  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46214  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46215
46216  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46217  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46218  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46219
46220    fi
46221  fi
46222
46223  # Make compilation sanity check
46224  for ac_header in stdio.h
46225do :
46226  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
46227if test "x$ac_cv_header_stdio_h" = xyes; then :
46228  cat >>confdefs.h <<_ACEOF
46229#define HAVE_STDIO_H 1
46230_ACEOF
46231
46232else
46233
46234    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
46235$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
46236    if test "x$COMPILE_TYPE" = xreduced; then
46237
46238  # Print a helpful message on how to acquire the necessary build dependency.
46239  # reduced is the help tag: freetype, cups, alsa etc
46240  MISSING_DEPENDENCY=reduced
46241
46242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46243    cygwin_help $MISSING_DEPENDENCY
46244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46245    msys_help $MISSING_DEPENDENCY
46246  else
46247    PKGHANDLER_COMMAND=
46248
46249    case $PKGHANDLER in
46250      apt-get)
46251        apt_help     $MISSING_DEPENDENCY ;;
46252      yum)
46253        yum_help     $MISSING_DEPENDENCY ;;
46254      port)
46255        port_help    $MISSING_DEPENDENCY ;;
46256      pkgutil)
46257        pkgutil_help $MISSING_DEPENDENCY ;;
46258      pkgadd)
46259        pkgadd_help  $MISSING_DEPENDENCY ;;
46260    esac
46261
46262    if test "x$PKGHANDLER_COMMAND" != x; then
46263      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46264    fi
46265  fi
46266
46267      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
46268$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
46269    elif test "x$COMPILE_TYPE" = xcross; then
46270      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
46271$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
46272    fi
46273    as_fn_error $? "Cannot continue." "$LINENO" 5
46274
46275fi
46276
46277done
46278
46279
46280  # The cast to long int works around a bug in the HP C Compiler
46281# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
46282# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
46283# This bug is HP SR number 8606223364.
46284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
46285$as_echo_n "checking size of int *... " >&6; }
46286if ${ac_cv_sizeof_int_p+:} false; then :
46287  $as_echo_n "(cached) " >&6
46288else
46289  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
46290
46291else
46292  if test "$ac_cv_type_int_p" = yes; then
46293     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46294$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46295as_fn_error 77 "cannot compute sizeof (int *)
46296See \`config.log' for more details" "$LINENO" 5; }
46297   else
46298     ac_cv_sizeof_int_p=0
46299   fi
46300fi
46301
46302fi
46303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
46304$as_echo "$ac_cv_sizeof_int_p" >&6; }
46305
46306
46307
46308cat >>confdefs.h <<_ACEOF
46309#define SIZEOF_INT_P $ac_cv_sizeof_int_p
46310_ACEOF
46311
46312
46313
46314  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
46315  if test "x$ac_cv_sizeof_int_p" = x; then
46316    # The test failed, lets stick to the assumed value.
46317    { $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
46318$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
46319  else
46320    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
46321
46322    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
46323      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
46324      # Let's try to implicitely set the compilers target architecture and retry the test
46325      { $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
46326$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;}
46327      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
46328$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
46329
46330  # When we add flags to the "official" CFLAGS etc, we need to
46331  # keep track of these additions in ADDED_CFLAGS etc. These
46332  # will later be checked to make sure only controlled additions
46333  # have been made to CFLAGS etc.
46334  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46335  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46336  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46337
46338  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46339  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46340  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46341
46342  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46343  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46344  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46345
46346
46347      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
46348      unset ac_cv_sizeof_int_p
46349      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
46350      cat >>confdefs.h <<_ACEOF
46351#undef SIZEOF_INT_P
46352_ACEOF
46353
46354      # The cast to long int works around a bug in the HP C Compiler
46355# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
46356# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
46357# This bug is HP SR number 8606223364.
46358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
46359$as_echo_n "checking size of int *... " >&6; }
46360if ${ac_cv_sizeof_int_p+:} false; then :
46361  $as_echo_n "(cached) " >&6
46362else
46363  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
46364
46365else
46366  if test "$ac_cv_type_int_p" = yes; then
46367     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46368$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46369as_fn_error 77 "cannot compute sizeof (int *)
46370See \`config.log' for more details" "$LINENO" 5; }
46371   else
46372     ac_cv_sizeof_int_p=0
46373   fi
46374fi
46375
46376fi
46377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
46378$as_echo "$ac_cv_sizeof_int_p" >&6; }
46379
46380
46381
46382cat >>confdefs.h <<_ACEOF
46383#define SIZEOF_INT_P $ac_cv_sizeof_int_p
46384_ACEOF
46385
46386
46387
46388      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
46389
46390      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
46391        { $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
46392$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;}
46393        if test "x$COMPILE_TYPE" = xreduced; then
46394
46395  # Print a helpful message on how to acquire the necessary build dependency.
46396  # reduced is the help tag: freetype, cups, alsa etc
46397  MISSING_DEPENDENCY=reduced
46398
46399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46400    cygwin_help $MISSING_DEPENDENCY
46401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46402    msys_help $MISSING_DEPENDENCY
46403  else
46404    PKGHANDLER_COMMAND=
46405
46406    case $PKGHANDLER in
46407      apt-get)
46408        apt_help     $MISSING_DEPENDENCY ;;
46409      yum)
46410        yum_help     $MISSING_DEPENDENCY ;;
46411      port)
46412        port_help    $MISSING_DEPENDENCY ;;
46413      pkgutil)
46414        pkgutil_help $MISSING_DEPENDENCY ;;
46415      pkgadd)
46416        pkgadd_help  $MISSING_DEPENDENCY ;;
46417    esac
46418
46419    if test "x$PKGHANDLER_COMMAND" != x; then
46420      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46421    fi
46422  fi
46423
46424          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
46425$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
46426        elif test "x$COMPILE_TYPE" = xcross; then
46427          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
46428$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
46429        fi
46430        as_fn_error $? "Cannot continue." "$LINENO" 5
46431      fi
46432    fi
46433  fi
46434
46435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
46436$as_echo_n "checking for target address size... " >&6; }
46437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
46438$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
46439
46440
46441  ###############################################################################
46442  #
46443  # Is the target little of big endian?
46444  #
46445   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
46446$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
46447if ${ac_cv_c_bigendian+:} false; then :
46448  $as_echo_n "(cached) " >&6
46449else
46450  ac_cv_c_bigendian=unknown
46451    # See if we're dealing with a universal compiler.
46452    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46453/* end confdefs.h.  */
46454#ifndef __APPLE_CC__
46455	       not a universal capable compiler
46456	     #endif
46457	     typedef int dummy;
46458
46459_ACEOF
46460if ac_fn_cxx_try_compile "$LINENO"; then :
46461
46462	# Check for potential -arch flags.  It is not universal unless
46463	# there are at least two -arch flags with different values.
46464	ac_arch=
46465	ac_prev=
46466	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
46467	 if test -n "$ac_prev"; then
46468	   case $ac_word in
46469	     i?86 | x86_64 | ppc | ppc64)
46470	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
46471		 ac_arch=$ac_word
46472	       else
46473		 ac_cv_c_bigendian=universal
46474		 break
46475	       fi
46476	       ;;
46477	   esac
46478	   ac_prev=
46479	 elif test "x$ac_word" = "x-arch"; then
46480	   ac_prev=arch
46481	 fi
46482       done
46483fi
46484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46485    if test $ac_cv_c_bigendian = unknown; then
46486      # See if sys/param.h defines the BYTE_ORDER macro.
46487      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46488/* end confdefs.h.  */
46489#include <sys/types.h>
46490	     #include <sys/param.h>
46491
46492int
46493main ()
46494{
46495#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
46496		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
46497		     && LITTLE_ENDIAN)
46498	      bogus endian macros
46499	     #endif
46500
46501  ;
46502  return 0;
46503}
46504_ACEOF
46505if ac_fn_cxx_try_compile "$LINENO"; then :
46506  # It does; now see whether it defined to BIG_ENDIAN or not.
46507	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46508/* end confdefs.h.  */
46509#include <sys/types.h>
46510		#include <sys/param.h>
46511
46512int
46513main ()
46514{
46515#if BYTE_ORDER != BIG_ENDIAN
46516		 not big endian
46517		#endif
46518
46519  ;
46520  return 0;
46521}
46522_ACEOF
46523if ac_fn_cxx_try_compile "$LINENO"; then :
46524  ac_cv_c_bigendian=yes
46525else
46526  ac_cv_c_bigendian=no
46527fi
46528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46529fi
46530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46531    fi
46532    if test $ac_cv_c_bigendian = unknown; then
46533      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
46534      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46535/* end confdefs.h.  */
46536#include <limits.h>
46537
46538int
46539main ()
46540{
46541#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
46542	      bogus endian macros
46543	     #endif
46544
46545  ;
46546  return 0;
46547}
46548_ACEOF
46549if ac_fn_cxx_try_compile "$LINENO"; then :
46550  # It does; now see whether it defined to _BIG_ENDIAN or not.
46551	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46552/* end confdefs.h.  */
46553#include <limits.h>
46554
46555int
46556main ()
46557{
46558#ifndef _BIG_ENDIAN
46559		 not big endian
46560		#endif
46561
46562  ;
46563  return 0;
46564}
46565_ACEOF
46566if ac_fn_cxx_try_compile "$LINENO"; then :
46567  ac_cv_c_bigendian=yes
46568else
46569  ac_cv_c_bigendian=no
46570fi
46571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46572fi
46573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46574    fi
46575    if test $ac_cv_c_bigendian = unknown; then
46576      # Compile a test program.
46577      if test "$cross_compiling" = yes; then :
46578  # Try to guess by grepping values from an object file.
46579	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46580/* end confdefs.h.  */
46581short int ascii_mm[] =
46582		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
46583		short int ascii_ii[] =
46584		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
46585		int use_ascii (int i) {
46586		  return ascii_mm[i] + ascii_ii[i];
46587		}
46588		short int ebcdic_ii[] =
46589		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
46590		short int ebcdic_mm[] =
46591		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
46592		int use_ebcdic (int i) {
46593		  return ebcdic_mm[i] + ebcdic_ii[i];
46594		}
46595		extern int foo;
46596
46597int
46598main ()
46599{
46600return use_ascii (foo) == use_ebcdic (foo);
46601  ;
46602  return 0;
46603}
46604_ACEOF
46605if ac_fn_cxx_try_compile "$LINENO"; then :
46606  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
46607	      ac_cv_c_bigendian=yes
46608	    fi
46609	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
46610	      if test "$ac_cv_c_bigendian" = unknown; then
46611		ac_cv_c_bigendian=no
46612	      else
46613		# finding both strings is unlikely to happen, but who knows?
46614		ac_cv_c_bigendian=unknown
46615	      fi
46616	    fi
46617fi
46618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46619else
46620  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46621/* end confdefs.h.  */
46622$ac_includes_default
46623int
46624main ()
46625{
46626
46627	     /* Are we little or big endian?  From Harbison&Steele.  */
46628	     union
46629	     {
46630	       long int l;
46631	       char c[sizeof (long int)];
46632	     } u;
46633	     u.l = 1;
46634	     return u.c[sizeof (long int) - 1] == 1;
46635
46636  ;
46637  return 0;
46638}
46639_ACEOF
46640if ac_fn_cxx_try_run "$LINENO"; then :
46641  ac_cv_c_bigendian=no
46642else
46643  ac_cv_c_bigendian=yes
46644fi
46645rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46646  conftest.$ac_objext conftest.beam conftest.$ac_ext
46647fi
46648
46649    fi
46650fi
46651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
46652$as_echo "$ac_cv_c_bigendian" >&6; }
46653 case $ac_cv_c_bigendian in #(
46654   yes)
46655     ENDIAN="big";; #(
46656   no)
46657     ENDIAN="little" ;; #(
46658   universal)
46659     ENDIAN="universal_endianness"
46660     ;; #(
46661   *)
46662     ENDIAN="unknown" ;;
46663 esac
46664
46665
46666  if test "x$ENDIAN" = xuniversal_endianness; then
46667    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
46668  fi
46669  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
46670    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
46671  fi
46672
46673
46674# Configure flags for the tools
46675
46676  ###############################################################################
46677  #
46678  # How to compile shared libraries.
46679  #
46680
46681  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46682    PICFLAG="-fPIC"
46683    C_FLAG_REORDER=''
46684    CXX_FLAG_REORDER=''
46685
46686    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46687      # Linking is different on MacOSX
46688      if test "x$STATIC_BUILD" = xtrue; then
46689        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
46690      else
46691        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46692      fi
46693      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46694      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46695      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46696      SET_SHARED_LIBRARY_MAPFILE=''
46697    else
46698      # Default works for linux, might work on other platforms as well.
46699      SHARED_LIBRARY_FLAGS='-shared'
46700      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46701      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46702      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46703      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46704    fi
46705  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46706    C_FLAG_REORDER=''
46707    CXX_FLAG_REORDER=''
46708
46709    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46710      # Linking is different on MacOSX
46711      PICFLAG=''
46712      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46713      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46714      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46715      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46716      SET_SHARED_LIBRARY_MAPFILE=''
46717    else
46718      # Default works for linux, might work on other platforms as well.
46719      PICFLAG='-fPIC'
46720      SHARED_LIBRARY_FLAGS='-shared'
46721      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46722      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46723      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46724      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46725    fi
46726  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46727    PICFLAG="-KPIC"
46728    C_FLAG_REORDER='-xF'
46729    CXX_FLAG_REORDER='-xF'
46730    SHARED_LIBRARY_FLAGS="-G"
46731    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
46732    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46733    SET_SHARED_LIBRARY_NAME='-h $1'
46734    SET_SHARED_LIBRARY_MAPFILE='-M$1'
46735  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46736    PICFLAG="-qpic=large"
46737    C_FLAG_REORDER=''
46738    CXX_FLAG_REORDER=''
46739    SHARED_LIBRARY_FLAGS="-qmkshrobj"
46740    SET_EXECUTABLE_ORIGIN=""
46741    SET_SHARED_LIBRARY_ORIGIN=''
46742    SET_SHARED_LIBRARY_NAME=''
46743    SET_SHARED_LIBRARY_MAPFILE=''
46744  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46745    PICFLAG=""
46746    C_FLAG_REORDER=''
46747    CXX_FLAG_REORDER=''
46748    SHARED_LIBRARY_FLAGS="-dll"
46749    SET_EXECUTABLE_ORIGIN=''
46750    SET_SHARED_LIBRARY_ORIGIN=''
46751    SET_SHARED_LIBRARY_NAME=''
46752    SET_SHARED_LIBRARY_MAPFILE=''
46753  fi
46754
46755
46756
46757
46758
46759
46760
46761
46762
46763  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46764    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
46765    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
46766    CFLAGS_JDKLIB_EXTRA='-xstrconst'
46767  fi
46768  # The (cross) compiler is now configured, we can now test capabilities
46769  # of the target platform.
46770
46771
46772
46773  ###############################################################################
46774  #
46775  # Setup the opt flags for different compilers
46776  # and different operating systems.
46777  #
46778
46779  # FIXME: this was indirectly the old default, but just inherited.
46780  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46781  #   C_FLAG_DEPS="-MMD -MF"
46782  # fi
46783
46784  # Generate make dependency files
46785  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46786    C_FLAG_DEPS="-MMD -MF"
46787  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46788    C_FLAG_DEPS="-MMD -MF"
46789  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46790    C_FLAG_DEPS="-xMMD -xMF"
46791  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46792    C_FLAG_DEPS="-qmakedep=gcc -MF"
46793  fi
46794  CXX_FLAG_DEPS="$C_FLAG_DEPS"
46795
46796
46797
46798  # Debug symbols
46799  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46800    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
46801      # reduce from default "-g2" option to save space
46802      CFLAGS_DEBUG_SYMBOLS="-g1"
46803      CXXFLAGS_DEBUG_SYMBOLS="-g1"
46804    else
46805      CFLAGS_DEBUG_SYMBOLS="-g"
46806      CXXFLAGS_DEBUG_SYMBOLS="-g"
46807    fi
46808  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46809    CFLAGS_DEBUG_SYMBOLS="-g"
46810    CXXFLAGS_DEBUG_SYMBOLS="-g"
46811  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46812    CFLAGS_DEBUG_SYMBOLS="-g -xs"
46813    # FIXME: likely a bug, this disables debug symbols rather than enables them
46814    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
46815  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46816    CFLAGS_DEBUG_SYMBOLS="-g"
46817    CXXFLAGS_DEBUG_SYMBOLS="-g"
46818  fi
46819
46820
46821
46822  # bounds, memory and behavior checking options
46823  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46824    case $DEBUG_LEVEL in
46825    release )
46826      # no adjustment
46827      ;;
46828    fastdebug )
46829      # no adjustment
46830      ;;
46831    slowdebug )
46832      # Add runtime stack smashing and undefined behavior checks.
46833      # Not all versions of gcc support -fstack-protector
46834      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
46835
46836  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
46837$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
46838  supports=yes
46839
46840  saved_cflags="$CFLAGS"
46841  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
46842  ac_ext=c
46843ac_cpp='$CPP $CPPFLAGS'
46844ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46845ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46846ac_compiler_gnu=$ac_cv_c_compiler_gnu
46847
46848  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46849/* end confdefs.h.  */
46850int i;
46851_ACEOF
46852if ac_fn_c_try_compile "$LINENO"; then :
46853
46854else
46855  supports=no
46856fi
46857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46858  ac_ext=cpp
46859ac_cpp='$CXXCPP $CPPFLAGS'
46860ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46861ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46862ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46863
46864  CFLAGS="$saved_cflags"
46865
46866  saved_cxxflags="$CXXFLAGS"
46867  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
46868  ac_ext=cpp
46869ac_cpp='$CXXCPP $CPPFLAGS'
46870ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46871ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46872ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46873
46874  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46875/* end confdefs.h.  */
46876int i;
46877_ACEOF
46878if ac_fn_cxx_try_compile "$LINENO"; then :
46879
46880else
46881  supports=no
46882fi
46883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46884  ac_ext=cpp
46885ac_cpp='$CXXCPP $CPPFLAGS'
46886ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46887ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46888ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46889
46890  CXXFLAGS="$saved_cxxflags"
46891
46892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46893$as_echo "$supports" >&6; }
46894  if test "x$supports" = "xyes" ; then
46895    :
46896  else
46897    STACK_PROTECTOR_CFLAG=""
46898  fi
46899
46900
46901      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46902      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46903      ;;
46904    esac
46905  fi
46906
46907  # Optimization levels
46908  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46909    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
46910
46911    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
46912      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
46913      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
46914      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
46915      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
46916      C_O_FLAG_DEBUG="-xregs=no%frameptr"
46917      C_O_FLAG_NONE="-xregs=no%frameptr"
46918      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
46919      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
46920      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
46921      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
46922      CXX_O_FLAG_NONE="-xregs=no%frameptr"
46923      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46924        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
46925        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
46926      fi
46927    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46928      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
46929      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46930      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46931      C_O_FLAG_DEBUG=""
46932      C_O_FLAG_NONE=""
46933      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
46934      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46935      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46936      C_O_FLAG_DEBUG=""
46937      CXX_O_FLAG_NONE=""
46938    fi
46939  else
46940    # The remaining toolchains share opt flags between CC and CXX;
46941    # setup for C and duplicate afterwards.
46942    if test "x$TOOLCHAIN_TYPE" = xgcc; then
46943      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46944        # On MacOSX we optimize for size, something
46945        # we should do for all platforms?
46946        C_O_FLAG_HIGHEST="-Os"
46947        C_O_FLAG_HI="-Os"
46948        C_O_FLAG_NORM="-Os"
46949      else
46950        C_O_FLAG_HIGHEST="-O3"
46951        C_O_FLAG_HI="-O3"
46952        C_O_FLAG_NORM="-O2"
46953      fi
46954      C_O_FLAG_DEBUG="-O0"
46955      C_O_FLAG_NONE="-O0"
46956    elif test "x$TOOLCHAIN_TYPE" = xclang; then
46957      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46958        # On MacOSX we optimize for size, something
46959        # we should do for all platforms?
46960        C_O_FLAG_HIGHEST="-Os"
46961        C_O_FLAG_HI="-Os"
46962        C_O_FLAG_NORM="-Os"
46963      else
46964        C_O_FLAG_HIGHEST="-O3"
46965        C_O_FLAG_HI="-O3"
46966        C_O_FLAG_NORM="-O2"
46967      fi
46968      C_O_FLAG_DEBUG="-O0"
46969      C_O_FLAG_NONE="-O0"
46970    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46971      C_O_FLAG_HIGHEST="-O3"
46972      C_O_FLAG_HI="-O3 -qstrict"
46973      C_O_FLAG_NORM="-O2"
46974      C_O_FLAG_DEBUG="-qnoopt"
46975      C_O_FLAG_NONE="-qnoop"
46976    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46977      C_O_FLAG_HIGHEST="-O2"
46978      C_O_FLAG_HI="-O1"
46979      C_O_FLAG_NORM="-O1"
46980      C_O_FLAG_DEBUG="-Od"
46981      C_O_FLAG_NONE="-Od"
46982    fi
46983    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
46984    CXX_O_FLAG_HI="$C_O_FLAG_HI"
46985    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
46986    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
46987    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
46988  fi
46989
46990  # Adjust optimization flags according to debug level.
46991  case $DEBUG_LEVEL in
46992    release )
46993      # no adjustment
46994      ;;
46995    fastdebug )
46996      # Not quite so much optimization
46997      C_O_FLAG_HI="$C_O_FLAG_NORM"
46998      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
46999      ;;
47000    slowdebug )
47001      # Disable optimization
47002      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
47003      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
47004      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
47005      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
47006      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
47007      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
47008      ;;
47009  esac
47010
47011
47012
47013
47014
47015
47016
47017
47018
47019
47020
47021
47022
47023  # Special extras...
47024  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47025    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
47026      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
47027      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
47028    fi
47029    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
47030    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
47031  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47032    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
47033    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
47034  fi
47035
47036  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
47037  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
47038  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
47039
47040  ###############################################################################
47041  #
47042  # Now setup the CFLAGS and LDFLAGS for the JDK build.
47043  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
47044  #
47045
47046  # Setup compiler/platform specific flags into
47047  #    CFLAGS_JDK    - C Compiler flags
47048  #    CXXFLAGS_JDK  - C++ Compiler flags
47049  #    COMMON_CCXXFLAGS_JDK - common to C and C++
47050  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47051    if test "x$OPENJDK_TARGET_CPU" = xx86; then
47052      # Force compatibility with i586 on 32 bit intel platforms.
47053      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
47054    fi
47055    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
47056        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
47057    case $OPENJDK_TARGET_CPU_ARCH in
47058      arm )
47059        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47060        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47061        ;;
47062      ppc )
47063        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47064        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47065        ;;
47066      * )
47067        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
47068        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47069        ;;
47070    esac
47071  elif test "x$TOOLCHAIN_TYPE" = xclang; then
47072    if test "x$OPENJDK_TARGET_OS" = xlinux; then
47073	    if test "x$OPENJDK_TARGET_CPU" = xx86; then
47074	      # Force compatibility with i586 on 32 bit intel platforms.
47075	      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
47076	    fi
47077	    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
47078	        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
47079	    case $OPENJDK_TARGET_CPU_ARCH in
47080	      ppc )
47081	        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47082	        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47083	        ;;
47084	      * )
47085	        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
47086	        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47087	        ;;
47088	    esac
47089    fi
47090  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47091    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
47092    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
47093      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
47094    fi
47095
47096    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
47097    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
47098  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47099    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
47100    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
47101  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47102    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
47103        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
47104        -DWIN32_LEAN_AND_MEAN \
47105        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
47106        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
47107        -DWIN32 -DIAL"
47108    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
47109      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
47110    else
47111      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
47112    fi
47113    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
47114    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
47115    # studio.
47116    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
47117      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
47118          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
47119    fi
47120  fi
47121
47122  ###############################################################################
47123
47124  # Adjust flags according to debug level.
47125  case $DEBUG_LEVEL in
47126    fastdebug | slowdebug )
47127      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
47128      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
47129      JAVAC_FLAGS="$JAVAC_FLAGS -g"
47130      ;;
47131    release )
47132      ;;
47133    * )
47134      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
47135      ;;
47136  esac
47137
47138  # Setup LP64
47139  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
47140
47141  # Set some common defines. These works for all compilers, but assume
47142  # -D is universally accepted.
47143
47144  # Setup endianness
47145  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
47146    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
47147    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
47148    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
47149    #   Note: -Dmacro         is the same as    #define macro 1
47150    #         -Dmacro=        is the same as    #define macro
47151    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47152      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
47153    else
47154      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
47155    fi
47156  else
47157    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
47158    # are defined in the system?
47159    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47160      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
47161    else
47162      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
47163    fi
47164  fi
47165
47166  # Setup target OS define. Use OS target name but in upper case.
47167  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
47168  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
47169
47170  # Setup target CPU
47171  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
47172
47173  # Setup debug/release defines
47174  if test "x$DEBUG_LEVEL" = xrelease; then
47175    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
47176    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47177      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
47178    fi
47179  else
47180    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
47181  fi
47182
47183  # Set some additional per-OS defines.
47184  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47185    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
47186  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47187    # FIXME: PPC64 should not be here.
47188    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
47189  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
47190    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
47191  fi
47192
47193  # Additional macosx handling
47194  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47195    # Setting these parameters makes it an error to link to macosx APIs that are
47196    # newer than the given OS version and makes the linked binaries compatible
47197    # even if built on a newer version of the OS.
47198    # The expected format is X.Y.Z
47199    MACOSX_VERSION_MIN=10.7.0
47200
47201
47202    # The macro takes the version with no dots, ex: 1070
47203    # Let the flags variables get resolved in make for easier override on make
47204    # command line.
47205    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
47206    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
47207  fi
47208
47209  # Setup some hard coded includes
47210  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
47211      -I${JDK_TOPDIR}/src/java.base/share/native/include \
47212      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
47213      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
47214      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
47215      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
47216
47217  # The shared libraries are compiled using the picflag.
47218  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
47219  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
47220
47221  # Executable flags
47222  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
47223  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
47224
47225
47226
47227
47228
47229
47230  # Flags for compiling test libraries
47231  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
47232  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
47233
47234  # Flags for compiling test executables
47235  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
47236  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
47237
47238
47239
47240
47241
47242
47243  # Setup LDFLAGS et al.
47244  #
47245
47246  # Now this is odd. The JDK native libraries have to link against libjvm.so
47247  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
47248  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
47249  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
47250  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
47251  # libraries will link to whatever is in memory. Yuck.
47252  #
47253  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
47254  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47255    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
47256    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
47257      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
47258    fi
47259    # TODO: make -debug optional "--disable-full-debug-symbols"
47260    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
47261  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
47262    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47263    # We have previously set HAS_GNU_HASH if this is the case
47264    if test -n "$HAS_GNU_HASH"; then
47265      LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,--hash-style=both"
47266    fi
47267    if test "x$OPENJDK_TARGET_OS" = xlinux; then
47268      # And since we now know that the linker is gnu, then add -z defs, to forbid
47269      # undefined symbols in object files.
47270      LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-z,defs"
47271      case $DEBUG_LEVEL in
47272        release )
47273          # tell linker to optimize libraries.
47274          # Should this be supplied to the OSS linker as well?
47275          LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-O1"
47276          ;;
47277        slowdebug )
47278          if test "x$HAS_LINKER_NOW" = "xtrue"; then
47279            # do relocations at load
47280            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
47281            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
47282          fi
47283          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
47284            # mark relocations read only
47285            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
47286            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
47287          fi
47288          ;;
47289        fastdebug )
47290          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
47291            # mark relocations read only
47292            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
47293            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
47294          fi
47295          ;;
47296        * )
47297          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
47298          ;;
47299        esac
47300    fi
47301  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47302    LDFLAGS_JDK="$LDFLAGS_JDK -Wl,-z,defs -xildoff -ztext"
47303    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
47304  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47305    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
47306  fi
47307
47308  # Customize LDFLAGS for executables
47309
47310  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
47311
47312  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47313    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
47314      LDFLAGS_STACK_SIZE=1048576
47315    else
47316      LDFLAGS_STACK_SIZE=327680
47317    fi
47318    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
47319  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
47320    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
47321  fi
47322
47323  # Customize LDFLAGS for libs
47324  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
47325
47326  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
47327  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47328    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
47329        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
47330    JDKLIB_LIBS=""
47331  else
47332    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
47333        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
47334
47335    # On some platforms (mac) the linker warns about non existing -L dirs.
47336    # Add server first if available. Linking aginst client does not always produce the same results.
47337    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
47338    # Default to server for other variants.
47339    if test "x$JVM_VARIANT_SERVER" = xtrue; then
47340      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
47341    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
47342      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
47343    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
47344      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
47345    else
47346      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
47347    fi
47348
47349    JDKLIB_LIBS="-ljava -ljvm"
47350    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47351      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
47352    fi
47353  fi
47354
47355
47356
47357
47358
47359
47360
47361  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
47362  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
47363
47364
47365
47366
47367
47368  # Some Zero and Shark settings.
47369  # ZERO_ARCHFLAG tells the compiler which mode to build for
47370  case "${OPENJDK_TARGET_CPU}" in
47371    s390)
47372      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
47373      ;;
47374    *)
47375      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47376  esac
47377
47378  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
47379$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
47380  supports=yes
47381
47382  saved_cflags="$CFLAGS"
47383  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
47384  ac_ext=c
47385ac_cpp='$CPP $CPPFLAGS'
47386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47388ac_compiler_gnu=$ac_cv_c_compiler_gnu
47389
47390  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47391/* end confdefs.h.  */
47392int i;
47393_ACEOF
47394if ac_fn_c_try_compile "$LINENO"; then :
47395
47396else
47397  supports=no
47398fi
47399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47400  ac_ext=cpp
47401ac_cpp='$CXXCPP $CPPFLAGS'
47402ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47403ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47404ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47405
47406  CFLAGS="$saved_cflags"
47407
47408  saved_cxxflags="$CXXFLAGS"
47409  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
47410  ac_ext=cpp
47411ac_cpp='$CXXCPP $CPPFLAGS'
47412ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47413ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47414ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47415
47416  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47417/* end confdefs.h.  */
47418int i;
47419_ACEOF
47420if ac_fn_cxx_try_compile "$LINENO"; then :
47421
47422else
47423  supports=no
47424fi
47425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47426  ac_ext=cpp
47427ac_cpp='$CXXCPP $CPPFLAGS'
47428ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47429ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47430ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47431
47432  CXXFLAGS="$saved_cxxflags"
47433
47434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47435$as_echo "$supports" >&6; }
47436  if test "x$supports" = "xyes" ; then
47437    :
47438  else
47439    ZERO_ARCHFLAG=""
47440  fi
47441
47442
47443
47444  # Check that the compiler supports -mX (or -qX on AIX) flags
47445  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
47446
47447  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
47448$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
47449  supports=yes
47450
47451  saved_cflags="$CFLAGS"
47452  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47453  ac_ext=c
47454ac_cpp='$CPP $CPPFLAGS'
47455ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47456ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47457ac_compiler_gnu=$ac_cv_c_compiler_gnu
47458
47459  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47460/* end confdefs.h.  */
47461int i;
47462_ACEOF
47463if ac_fn_c_try_compile "$LINENO"; then :
47464
47465else
47466  supports=no
47467fi
47468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47469  ac_ext=cpp
47470ac_cpp='$CXXCPP $CPPFLAGS'
47471ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47472ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47473ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47474
47475  CFLAGS="$saved_cflags"
47476
47477  saved_cxxflags="$CXXFLAGS"
47478  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47479  ac_ext=cpp
47480ac_cpp='$CXXCPP $CPPFLAGS'
47481ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47482ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47483ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47484
47485  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47486/* end confdefs.h.  */
47487int i;
47488_ACEOF
47489if ac_fn_cxx_try_compile "$LINENO"; then :
47490
47491else
47492  supports=no
47493fi
47494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47495  ac_ext=cpp
47496ac_cpp='$CXXCPP $CPPFLAGS'
47497ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47498ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47499ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47500
47501  CXXFLAGS="$saved_cxxflags"
47502
47503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47504$as_echo "$supports" >&6; }
47505  if test "x$supports" = "xyes" ; then
47506    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
47507  else
47508    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
47509  fi
47510
47511
47512
47513  # Check whether --enable-warnings-as-errors was given.
47514if test "${enable_warnings_as_errors+set}" = set; then :
47515  enableval=$enable_warnings_as_errors;
47516fi
47517
47518
47519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
47520$as_echo_n "checking if native warnings are errors... " >&6; }
47521  if test "x$enable_warnings_as_errors" = "xyes"; then
47522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
47523$as_echo "yes (explicitely set)" >&6; }
47524    WARNINGS_AS_ERRORS=true
47525  elif test "x$enable_warnings_as_errors" = "xno"; then
47526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47527$as_echo "no" >&6; }
47528    WARNINGS_AS_ERRORS=false
47529  elif test "x$enable_warnings_as_errors" = "x"; then
47530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
47531$as_echo "yes (default)" >&6; }
47532    WARNINGS_AS_ERRORS=true
47533  else
47534    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
47535  fi
47536
47537  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
47538    # Set legacy hotspot variable
47539    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
47540  else
47541    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
47542  fi
47543
47544
47545
47546
47547  case "${TOOLCHAIN_TYPE}" in
47548    microsoft)
47549      DISABLE_WARNING_PREFIX="-wd"
47550      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
47551      ;;
47552    solstudio)
47553      DISABLE_WARNING_PREFIX="-erroff="
47554      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
47555      ;;
47556    gcc)
47557      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
47558
47559  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47560$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47561  supports=yes
47562
47563  saved_cflags="$CFLAGS"
47564  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47565  ac_ext=c
47566ac_cpp='$CPP $CPPFLAGS'
47567ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47568ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47569ac_compiler_gnu=$ac_cv_c_compiler_gnu
47570
47571  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47572/* end confdefs.h.  */
47573int i;
47574_ACEOF
47575if ac_fn_c_try_compile "$LINENO"; then :
47576
47577else
47578  supports=no
47579fi
47580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47581  ac_ext=cpp
47582ac_cpp='$CXXCPP $CPPFLAGS'
47583ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47584ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47585ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47586
47587  CFLAGS="$saved_cflags"
47588
47589  saved_cxxflags="$CXXFLAGS"
47590  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
47591  ac_ext=cpp
47592ac_cpp='$CXXCPP $CPPFLAGS'
47593ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47594ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47595ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47596
47597  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47598/* end confdefs.h.  */
47599int i;
47600_ACEOF
47601if ac_fn_cxx_try_compile "$LINENO"; then :
47602
47603else
47604  supports=no
47605fi
47606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47607  ac_ext=cpp
47608ac_cpp='$CXXCPP $CPPFLAGS'
47609ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47610ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47611ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47612
47613  CXXFLAGS="$saved_cxxflags"
47614
47615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47616$as_echo "$supports" >&6; }
47617  if test "x$supports" = "xyes" ; then
47618    GCC_CAN_DISABLE_WARNINGS=true
47619  else
47620    GCC_CAN_DISABLE_WARNINGS=false
47621
47622  fi
47623
47624      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47625        DISABLE_WARNING_PREFIX="-Wno-"
47626      else
47627        DISABLE_WARNING_PREFIX=
47628      fi
47629      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47630      # Repeate the check for the BUILD_CC
47631      CC_OLD="$CC"
47632      CC="$BUILD_CC"
47633
47634  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47635$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47636  supports=yes
47637
47638  saved_cflags="$CFLAGS"
47639  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47640  ac_ext=c
47641ac_cpp='$CPP $CPPFLAGS'
47642ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47643ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47644ac_compiler_gnu=$ac_cv_c_compiler_gnu
47645
47646  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47647/* end confdefs.h.  */
47648int i;
47649_ACEOF
47650if ac_fn_c_try_compile "$LINENO"; then :
47651
47652else
47653  supports=no
47654fi
47655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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  CFLAGS="$saved_cflags"
47663
47664  saved_cxxflags="$CXXFLAGS"
47665  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
47666  ac_ext=cpp
47667ac_cpp='$CXXCPP $CPPFLAGS'
47668ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47669ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47670ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47671
47672  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47673/* end confdefs.h.  */
47674int i;
47675_ACEOF
47676if ac_fn_cxx_try_compile "$LINENO"; then :
47677
47678else
47679  supports=no
47680fi
47681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47682  ac_ext=cpp
47683ac_cpp='$CXXCPP $CPPFLAGS'
47684ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47685ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47686ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47687
47688  CXXFLAGS="$saved_cxxflags"
47689
47690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47691$as_echo "$supports" >&6; }
47692  if test "x$supports" = "xyes" ; then
47693    BUILD_CC_CAN_DISABLE_WARNINGS=true
47694  else
47695    BUILD_CC_CAN_DISABLE_WARNINGS=false
47696
47697  fi
47698
47699      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47700        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
47701      else
47702        BUILD_CC_DISABLE_WARNING_PREFIX=
47703      fi
47704      CC="$CC_OLD"
47705      ;;
47706    clang)
47707      DISABLE_WARNING_PREFIX="-Wno-"
47708      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47709      ;;
47710  esac
47711
47712
47713
47714
47715# Setup debug symbols (need objcopy from the toolchain for that)
47716
47717  #
47718  # NATIVE_DEBUG_SYMBOLS
47719  # This must be done after the toolchain is setup, since we're looking at objcopy.
47720  #
47721  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
47722$as_echo_n "checking what type of native debug symbols to use... " >&6; }
47723
47724# Check whether --with-native-debug-symbols was given.
47725if test "${with_native_debug_symbols+set}" = set; then :
47726  withval=$with_native_debug_symbols;
47727        if test "x$OPENJDK_TARGET_OS" = xaix; then
47728          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
47729            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
47730          fi
47731        fi
47732
47733else
47734
47735        if test "x$OPENJDK_TARGET_OS" = xaix; then
47736          # AIX doesn't support 'zipped' so use 'internal' as default
47737          with_native_debug_symbols="internal"
47738        else
47739          with_native_debug_symbols="zipped"
47740        fi
47741
47742fi
47743
47744  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
47745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
47746$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
47747
47748  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
47749
47750    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
47751      if test "x$OBJCOPY" = x; then
47752        # enabling of enable-debug-symbols and can't find objcopy
47753        # this is an error
47754        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
47755      fi
47756    fi
47757
47758    ENABLE_DEBUG_SYMBOLS=true
47759    ZIP_DEBUGINFO_FILES=true
47760    DEBUG_BINARIES=true
47761    STRIP_POLICY=min_strip
47762  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
47763    ENABLE_DEBUG_SYMBOLS=false
47764    ZIP_DEBUGINFO_FILES=false
47765    DEBUG_BINARIES=false
47766    STRIP_POLICY=no_strip
47767  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
47768    ENABLE_DEBUG_SYMBOLS=false  # -g option only
47769    ZIP_DEBUGINFO_FILES=false
47770    DEBUG_BINARIES=true
47771    STRIP_POLICY=no_strip
47772    STRIP=""
47773  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
47774
47775    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
47776      if test "x$OBJCOPY" = x; then
47777        # enabling of enable-debug-symbols and can't find objcopy
47778        # this is an error
47779        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
47780      fi
47781    fi
47782
47783    ENABLE_DEBUG_SYMBOLS=true
47784    ZIP_DEBUGINFO_FILES=false
47785    DEBUG_BINARIES=true
47786    STRIP_POLICY=min_strip
47787  else
47788    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
47789  fi
47790
47791  # --enable-debug-symbols is deprecated.
47792  # Please use --with-native-debug-symbols=[internal,external,zipped] .
47793
47794  # Check whether --enable-debug-symbols was given.
47795if test "${enable_debug_symbols+set}" = set; then :
47796  enableval=$enable_debug_symbols;
47797fi
47798
47799  if test "x$enable_debug_symbols" != x; then
47800    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
47801$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
47802
47803    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
47804      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
47805$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
47806    fi
47807
47808  fi
47809
47810
47811  # --enable-zip-debug-info is deprecated.
47812  # Please use --with-native-debug-symbols=zipped .
47813
47814  # Check whether --enable-zip-debug-info was given.
47815if test "${enable_zip_debug_info+set}" = set; then :
47816  enableval=$enable_zip_debug_info;
47817fi
47818
47819  if test "x$enable_zip_debug_info" != x; then
47820    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
47821$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
47822
47823    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
47824      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
47825$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
47826    fi
47827
47828  fi
47829
47830
47831
47832
47833
47834
47835
47836
47837
47838  # Check whether --enable-native-coverage was given.
47839if test "${enable_native_coverage+set}" = set; then :
47840  enableval=$enable_native_coverage;
47841fi
47842
47843  GCOV_ENABLED="false"
47844  if test "x$enable_native_coverage" = "xyes"; then
47845    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
47846      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47847$as_echo_n "checking if native coverage is enabled... " >&6; }
47848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47849$as_echo "yes" >&6; }
47850      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
47851      GCOV_LDFLAGS="-fprofile-arcs"
47852      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
47853      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
47854      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
47855      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
47856      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
47857      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
47858      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
47859      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
47860      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
47861      GCOV_ENABLED="true"
47862    else
47863      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
47864    fi
47865  elif test "x$enable_native_coverage" = "xno"; then
47866    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47867$as_echo_n "checking if native coverage is enabled... " >&6; }
47868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47869$as_echo "no" >&6; }
47870  elif test "x$enable_native_coverage" != "x"; then
47871    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
47872  fi
47873
47874
47875
47876
47877###############################################################################
47878#
47879# Check dependencies for external and internal libraries.
47880#
47881###############################################################################
47882
47883# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
47884
47885  # When using cygwin or msys, we need a wrapper binary that renames
47886  # /cygdrive/c/ arguments into c:/ arguments and peeks into
47887  # @files and rewrites these too! This wrapper binary is
47888  # called fixpath.
47889  FIXPATH=
47890  if test "x$OPENJDK_BUILD_OS" = xwindows; then
47891    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
47892$as_echo_n "checking if fixpath can be created... " >&6; }
47893    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
47894    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
47895    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
47896    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
47897      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
47898      FIXPATH="$FIXPATH_BIN -c"
47899    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
47900      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
47901      # @ was chosen as separator to minimize risk of other tools messing around with it
47902      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
47903          | tr ' ' '\n' | grep '^/./' | sort | uniq`
47904      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
47905      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
47906    fi
47907    FIXPATH_SRC_W="$FIXPATH_SRC"
47908    FIXPATH_BIN_W="$FIXPATH_BIN"
47909
47910  unix_path="$FIXPATH_SRC_W"
47911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47912    windows_path=`$CYGPATH -m "$unix_path"`
47913    FIXPATH_SRC_W="$windows_path"
47914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47915    windows_path=`cmd //c echo $unix_path`
47916    FIXPATH_SRC_W="$windows_path"
47917  fi
47918
47919
47920  unix_path="$FIXPATH_BIN_W"
47921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47922    windows_path=`$CYGPATH -m "$unix_path"`
47923    FIXPATH_BIN_W="$windows_path"
47924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47925    windows_path=`cmd //c echo $unix_path`
47926    FIXPATH_BIN_W="$windows_path"
47927  fi
47928
47929    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
47930    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
47931    cd $FIXPATH_DIR
47932    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
47933    cd $CURDIR
47934
47935    if test ! -x $FIXPATH_BIN; then
47936      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47937$as_echo "no" >&6; }
47938      cat $FIXPATH_DIR/fixpath1.log
47939      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
47940    fi
47941    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47942$as_echo "yes" >&6; }
47943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
47944$as_echo_n "checking if fixpath.exe works... " >&6; }
47945    cd $FIXPATH_DIR
47946    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
47947        > $FIXPATH_DIR/fixpath2.log 2>&1
47948    cd $CURDIR
47949    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
47950      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47951$as_echo "no" >&6; }
47952      cat $FIXPATH_DIR/fixpath2.log
47953      as_fn_error $? "fixpath did not work!" "$LINENO" 5
47954    fi
47955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47956$as_echo "yes" >&6; }
47957
47958    FIXPATH_DETACH_FLAG="--detach"
47959  fi
47960
47961
47962
47963
47964
47965
47966  # Check if X11 is needed
47967  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
47968    # No X11 support on windows or macosx
47969    NEEDS_LIB_X11=false
47970  else
47971    if test "x$SUPPORT_HEADFUL" = xno; then
47972      # No X11 support if building headless-only
47973      NEEDS_LIB_X11=false
47974    else
47975      # All other instances need X11
47976      NEEDS_LIB_X11=true
47977    fi
47978  fi
47979
47980  # Check if cups is needed
47981  if test "x$OPENJDK_TARGET_OS" = xwindows; then
47982    # Windows have a separate print system
47983    NEEDS_LIB_CUPS=false
47984  else
47985    NEEDS_LIB_CUPS=true
47986  fi
47987
47988  # Check if freetype is needed
47989  if test "x$OPENJDK" = "xtrue"; then
47990    NEEDS_LIB_FREETYPE=true
47991  else
47992    NEEDS_LIB_FREETYPE=false
47993  fi
47994
47995  # Check if alsa is needed
47996  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47997    NEEDS_LIB_ALSA=true
47998  else
47999    NEEDS_LIB_ALSA=false
48000  fi
48001
48002  # Check if ffi is needed
48003  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48004    NEEDS_LIB_FFI=true
48005  else
48006    NEEDS_LIB_FFI=false
48007  fi
48008
48009
48010  # statically link libstdc++ before C++ ABI is stablized on Linux unless
48011  # dynamic build is configured on command line.
48012
48013# Check whether --with-stdc++lib was given.
48014if test "${with_stdc__lib+set}" = set; then :
48015  withval=$with_stdc__lib;
48016        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
48017                && test "x$with_stdc__lib" != xdefault; then
48018          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
48019        fi
48020
48021else
48022  with_stdc__lib=default
48023
48024fi
48025
48026
48027  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48028    # Test if -lstdc++ works.
48029    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
48030$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
48031    ac_ext=cpp
48032ac_cpp='$CXXCPP $CPPFLAGS'
48033ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48034ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48035ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48036
48037    OLD_CXXFLAGS="$CXXFLAGS"
48038    CXXFLAGS="$CXXFLAGS -lstdc++"
48039    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48040/* end confdefs.h.  */
48041
48042int
48043main ()
48044{
48045return 0;
48046  ;
48047  return 0;
48048}
48049_ACEOF
48050if ac_fn_cxx_try_link "$LINENO"; then :
48051  has_dynamic_libstdcxx=yes
48052else
48053  has_dynamic_libstdcxx=no
48054fi
48055rm -f core conftest.err conftest.$ac_objext \
48056    conftest$ac_exeext conftest.$ac_ext
48057    CXXFLAGS="$OLD_CXXFLAGS"
48058    ac_ext=cpp
48059ac_cpp='$CXXCPP $CPPFLAGS'
48060ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48061ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48062ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48063
48064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
48065$as_echo "$has_dynamic_libstdcxx" >&6; }
48066
48067    # Test if stdc++ can be linked statically.
48068    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
48069$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
48070    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
48071    ac_ext=cpp
48072ac_cpp='$CXXCPP $CPPFLAGS'
48073ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48074ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48075ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48076
48077    OLD_LIBS="$LIBS"
48078    OLD_CXX="$CXX"
48079    LIBS="$STATIC_STDCXX_FLAGS"
48080    CXX="$CC"
48081    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48082/* end confdefs.h.  */
48083
48084int
48085main ()
48086{
48087return 0;
48088  ;
48089  return 0;
48090}
48091_ACEOF
48092if ac_fn_cxx_try_link "$LINENO"; then :
48093  has_static_libstdcxx=yes
48094else
48095  has_static_libstdcxx=no
48096fi
48097rm -f core conftest.err conftest.$ac_objext \
48098    conftest$ac_exeext conftest.$ac_ext
48099    LIBS="$OLD_LIBS"
48100    CXX="$OLD_CXX"
48101    ac_ext=cpp
48102ac_cpp='$CXXCPP $CPPFLAGS'
48103ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48104ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48105ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48106
48107    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
48108$as_echo "$has_static_libstdcxx" >&6; }
48109
48110    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
48111      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
48112    fi
48113
48114    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
48115      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
48116    fi
48117
48118    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
48119      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
48120    fi
48121
48122    # If dynamic was requested, it's available since it would fail above otherwise.
48123    # If dynamic wasn't requested, go with static unless it isn't available.
48124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
48125$as_echo_n "checking how to link with libstdc++... " >&6; }
48126    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48127      LIBCXX="$LIBCXX -lstdc++"
48128      LDCXX="$CXX"
48129      STATIC_CXX_SETTING="STATIC_CXX=false"
48130      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
48131$as_echo "dynamic" >&6; }
48132    else
48133      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
48134      LDCXX="$CC"
48135      STATIC_CXX_SETTING="STATIC_CXX=true"
48136      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
48137$as_echo "static" >&6; }
48138    fi
48139  fi
48140
48141
48142  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
48143  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
48144    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
48145  fi
48146
48147  # TODO better (platform agnostic) test
48148  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
48149    LIBCXX="-lstdc++"
48150  fi
48151
48152
48153  # Setup Windows runtime dlls
48154  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48155
48156
48157# Check whether --with-msvcr-dll was given.
48158if test "${with_msvcr_dll+set}" = set; then :
48159  withval=$with_msvcr_dll;
48160fi
48161
48162
48163  if test "x$with_msvcr_dll" != x; then
48164    # If given explicitely by user, do not probe. If not present, fail directly.
48165
48166  DLL_NAME="$MSVCR_NAME"
48167  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
48168  METHOD="--with-msvcr-dll"
48169  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48170    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48171$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48172
48173    # Need to check if the found msvcr is correct architecture
48174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48175$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48176    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48178      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48179      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48180      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48181        CORRECT_MSVCR_ARCH="PE32 executable"
48182      else
48183        CORRECT_MSVCR_ARCH="PE32+ executable"
48184      fi
48185    else
48186      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48187        CORRECT_MSVCR_ARCH=386
48188      else
48189        CORRECT_MSVCR_ARCH=x86-64
48190      fi
48191    fi
48192    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48193      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48194$as_echo "ok" >&6; }
48195      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48196
48197  # Only process if variable expands to non-empty
48198
48199  if test "x$MSVC_DLL" != x; then
48200    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48201
48202  # Input might be given as Windows format, start by converting to
48203  # unix format.
48204  path="$MSVC_DLL"
48205  new_path=`$CYGPATH -u "$path"`
48206
48207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48210  # "foo.exe" is OK but "foo" is an error.
48211  #
48212  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48213  # It is also a way to make sure we got the proper file name for the real test later on.
48214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48215  if test "x$test_shortpath" = x; then
48216    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48217$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48218    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48219  fi
48220
48221  # Call helper function which possibly converts this using DOS-style short mode.
48222  # If so, the updated path is stored in $new_path.
48223
48224  input_path="$new_path"
48225  # Check if we need to convert this using DOS-style short mode. If the path
48226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48227  # take no chances and rewrite it.
48228  # Note: m4 eats our [], so we need to use [ and ] instead.
48229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48230  if test "x$has_forbidden_chars" != x; then
48231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48232    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48233    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48234    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48235      # Going to short mode and back again did indeed matter. Since short mode is
48236      # case insensitive, let's make it lowercase to improve readability.
48237      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48238      # Now convert it back to Unix-style (cygpath)
48239      input_path=`$CYGPATH -u "$shortmode_path"`
48240      new_path="$input_path"
48241    fi
48242  fi
48243
48244  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48245  if test "x$test_cygdrive_prefix" = x; then
48246    # As a simple fix, exclude /usr/bin since it's not a real path.
48247    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48248      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48249      # a path prefixed by /cygdrive for fixpath to work.
48250      new_path="$CYGWIN_ROOT_PATH$input_path"
48251    fi
48252  fi
48253
48254
48255  if test "x$path" != "x$new_path"; then
48256    MSVC_DLL="$new_path"
48257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48258$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48259  fi
48260
48261    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48262
48263  path="$MSVC_DLL"
48264  has_colon=`$ECHO $path | $GREP ^.:`
48265  new_path="$path"
48266  if test "x$has_colon" = x; then
48267    # Not in mixed or Windows style, start by that.
48268    new_path=`cmd //c echo $path`
48269  fi
48270
48271
48272  input_path="$new_path"
48273  # Check if we need to convert this using DOS-style short mode. If the path
48274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48275  # take no chances and rewrite it.
48276  # Note: m4 eats our [], so we need to use [ and ] instead.
48277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48278  if test "x$has_forbidden_chars" != x; then
48279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48280    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48281  fi
48282
48283
48284  windows_path="$new_path"
48285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48286    unix_path=`$CYGPATH -u "$windows_path"`
48287    new_path="$unix_path"
48288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48290    new_path="$unix_path"
48291  fi
48292
48293  if test "x$path" != "x$new_path"; then
48294    MSVC_DLL="$new_path"
48295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48296$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48297  fi
48298
48299  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48300  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48301
48302    else
48303      # We're on a unix platform. Hooray! :)
48304      path="$MSVC_DLL"
48305      has_space=`$ECHO "$path" | $GREP " "`
48306      if test "x$has_space" != x; then
48307        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48308$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48309        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48310      fi
48311
48312      # Use eval to expand a potential ~
48313      eval path="$path"
48314      if test ! -f "$path" && test ! -d "$path"; then
48315        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48316      fi
48317
48318      if test -d "$path"; then
48319        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48320      else
48321        dir="`$DIRNAME "$path"`"
48322        base="`$BASENAME "$path"`"
48323        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48324      fi
48325    fi
48326  fi
48327
48328      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48329$as_echo_n "checking for $DLL_NAME... " >&6; }
48330      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48331$as_echo "$MSVC_DLL" >&6; }
48332    else
48333      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48334$as_echo "incorrect, ignoring" >&6; }
48335      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48336$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48337    fi
48338  fi
48339
48340    if test "x$MSVC_DLL" = x; then
48341      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
48342    fi
48343    MSVCR_DLL="$MSVC_DLL"
48344  elif test "x$DEVKIT_MSVCR_DLL" != x; then
48345
48346  DLL_NAME="$MSVCR_NAME"
48347  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
48348  METHOD="devkit"
48349  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48350    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48351$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48352
48353    # Need to check if the found msvcr is correct architecture
48354    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48355$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48356    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48357    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48358      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48359      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48360      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48361        CORRECT_MSVCR_ARCH="PE32 executable"
48362      else
48363        CORRECT_MSVCR_ARCH="PE32+ executable"
48364      fi
48365    else
48366      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48367        CORRECT_MSVCR_ARCH=386
48368      else
48369        CORRECT_MSVCR_ARCH=x86-64
48370      fi
48371    fi
48372    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48373      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48374$as_echo "ok" >&6; }
48375      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48376
48377  # Only process if variable expands to non-empty
48378
48379  if test "x$MSVC_DLL" != x; then
48380    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48381
48382  # Input might be given as Windows format, start by converting to
48383  # unix format.
48384  path="$MSVC_DLL"
48385  new_path=`$CYGPATH -u "$path"`
48386
48387  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48388  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48389  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48390  # "foo.exe" is OK but "foo" is an error.
48391  #
48392  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48393  # It is also a way to make sure we got the proper file name for the real test later on.
48394  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48395  if test "x$test_shortpath" = x; then
48396    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48397$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48398    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48399  fi
48400
48401  # Call helper function which possibly converts this using DOS-style short mode.
48402  # If so, the updated path is stored in $new_path.
48403
48404  input_path="$new_path"
48405  # Check if we need to convert this using DOS-style short mode. If the path
48406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48407  # take no chances and rewrite it.
48408  # Note: m4 eats our [], so we need to use [ and ] instead.
48409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48410  if test "x$has_forbidden_chars" != x; then
48411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48412    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48413    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48414    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48415      # Going to short mode and back again did indeed matter. Since short mode is
48416      # case insensitive, let's make it lowercase to improve readability.
48417      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48418      # Now convert it back to Unix-style (cygpath)
48419      input_path=`$CYGPATH -u "$shortmode_path"`
48420      new_path="$input_path"
48421    fi
48422  fi
48423
48424  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48425  if test "x$test_cygdrive_prefix" = x; then
48426    # As a simple fix, exclude /usr/bin since it's not a real path.
48427    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48428      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48429      # a path prefixed by /cygdrive for fixpath to work.
48430      new_path="$CYGWIN_ROOT_PATH$input_path"
48431    fi
48432  fi
48433
48434
48435  if test "x$path" != "x$new_path"; then
48436    MSVC_DLL="$new_path"
48437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48438$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48439  fi
48440
48441    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48442
48443  path="$MSVC_DLL"
48444  has_colon=`$ECHO $path | $GREP ^.:`
48445  new_path="$path"
48446  if test "x$has_colon" = x; then
48447    # Not in mixed or Windows style, start by that.
48448    new_path=`cmd //c echo $path`
48449  fi
48450
48451
48452  input_path="$new_path"
48453  # Check if we need to convert this using DOS-style short mode. If the path
48454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48455  # take no chances and rewrite it.
48456  # Note: m4 eats our [], so we need to use [ and ] instead.
48457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48458  if test "x$has_forbidden_chars" != x; then
48459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48460    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48461  fi
48462
48463
48464  windows_path="$new_path"
48465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48466    unix_path=`$CYGPATH -u "$windows_path"`
48467    new_path="$unix_path"
48468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48470    new_path="$unix_path"
48471  fi
48472
48473  if test "x$path" != "x$new_path"; then
48474    MSVC_DLL="$new_path"
48475    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48476$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48477  fi
48478
48479  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48480  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48481
48482    else
48483      # We're on a unix platform. Hooray! :)
48484      path="$MSVC_DLL"
48485      has_space=`$ECHO "$path" | $GREP " "`
48486      if test "x$has_space" != x; then
48487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48488$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48489        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48490      fi
48491
48492      # Use eval to expand a potential ~
48493      eval path="$path"
48494      if test ! -f "$path" && test ! -d "$path"; then
48495        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48496      fi
48497
48498      if test -d "$path"; then
48499        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48500      else
48501        dir="`$DIRNAME "$path"`"
48502        base="`$BASENAME "$path"`"
48503        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48504      fi
48505    fi
48506  fi
48507
48508      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48509$as_echo_n "checking for $DLL_NAME... " >&6; }
48510      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48511$as_echo "$MSVC_DLL" >&6; }
48512    else
48513      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48514$as_echo "incorrect, ignoring" >&6; }
48515      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48516$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48517    fi
48518  fi
48519
48520    if test "x$MSVC_DLL" = x; then
48521      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
48522    fi
48523    MSVCR_DLL="$MSVC_DLL"
48524  else
48525
48526  DLL_NAME="${MSVCR_NAME}"
48527  MSVC_DLL=
48528
48529  if test "x$MSVC_DLL" = x; then
48530    # Probe: Using well-known location from Visual Studio 10.0
48531    if test "x$VCINSTALLDIR" != x; then
48532      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48533
48534  windows_path="$CYGWIN_VC_INSTALL_DIR"
48535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48536    unix_path=`$CYGPATH -u "$windows_path"`
48537    CYGWIN_VC_INSTALL_DIR="$unix_path"
48538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48540    CYGWIN_VC_INSTALL_DIR="$unix_path"
48541  fi
48542
48543      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48544        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48545      else
48546        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48547      fi
48548      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
48549
48550  DLL_NAME="$DLL_NAME"
48551  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48552  METHOD="well-known location in VCINSTALLDIR"
48553  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48554    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48555$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48556
48557    # Need to check if the found msvcr is correct architecture
48558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48559$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48560    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48561    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48562      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48563      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48564      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48565        CORRECT_MSVCR_ARCH="PE32 executable"
48566      else
48567        CORRECT_MSVCR_ARCH="PE32+ executable"
48568      fi
48569    else
48570      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48571        CORRECT_MSVCR_ARCH=386
48572      else
48573        CORRECT_MSVCR_ARCH=x86-64
48574      fi
48575    fi
48576    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48577      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48578$as_echo "ok" >&6; }
48579      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48580
48581  # Only process if variable expands to non-empty
48582
48583  if test "x$MSVC_DLL" != x; then
48584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48585
48586  # Input might be given as Windows format, start by converting to
48587  # unix format.
48588  path="$MSVC_DLL"
48589  new_path=`$CYGPATH -u "$path"`
48590
48591  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48592  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48593  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48594  # "foo.exe" is OK but "foo" is an error.
48595  #
48596  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48597  # It is also a way to make sure we got the proper file name for the real test later on.
48598  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48599  if test "x$test_shortpath" = x; then
48600    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48601$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48602    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48603  fi
48604
48605  # Call helper function which possibly converts this using DOS-style short mode.
48606  # If so, the updated path is stored in $new_path.
48607
48608  input_path="$new_path"
48609  # Check if we need to convert this using DOS-style short mode. If the path
48610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48611  # take no chances and rewrite it.
48612  # Note: m4 eats our [], so we need to use [ and ] instead.
48613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48614  if test "x$has_forbidden_chars" != x; then
48615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48619      # Going to short mode and back again did indeed matter. Since short mode is
48620      # case insensitive, let's make it lowercase to improve readability.
48621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48622      # Now convert it back to Unix-style (cygpath)
48623      input_path=`$CYGPATH -u "$shortmode_path"`
48624      new_path="$input_path"
48625    fi
48626  fi
48627
48628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48629  if test "x$test_cygdrive_prefix" = x; then
48630    # As a simple fix, exclude /usr/bin since it's not a real path.
48631    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48633      # a path prefixed by /cygdrive for fixpath to work.
48634      new_path="$CYGWIN_ROOT_PATH$input_path"
48635    fi
48636  fi
48637
48638
48639  if test "x$path" != "x$new_path"; then
48640    MSVC_DLL="$new_path"
48641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48642$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48643  fi
48644
48645    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48646
48647  path="$MSVC_DLL"
48648  has_colon=`$ECHO $path | $GREP ^.:`
48649  new_path="$path"
48650  if test "x$has_colon" = x; then
48651    # Not in mixed or Windows style, start by that.
48652    new_path=`cmd //c echo $path`
48653  fi
48654
48655
48656  input_path="$new_path"
48657  # Check if we need to convert this using DOS-style short mode. If the path
48658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48659  # take no chances and rewrite it.
48660  # Note: m4 eats our [], so we need to use [ and ] instead.
48661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48662  if test "x$has_forbidden_chars" != x; then
48663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48664    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48665  fi
48666
48667
48668  windows_path="$new_path"
48669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48670    unix_path=`$CYGPATH -u "$windows_path"`
48671    new_path="$unix_path"
48672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48674    new_path="$unix_path"
48675  fi
48676
48677  if test "x$path" != "x$new_path"; then
48678    MSVC_DLL="$new_path"
48679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48680$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48681  fi
48682
48683  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48684  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48685
48686    else
48687      # We're on a unix platform. Hooray! :)
48688      path="$MSVC_DLL"
48689      has_space=`$ECHO "$path" | $GREP " "`
48690      if test "x$has_space" != x; then
48691        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48692$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48693        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48694      fi
48695
48696      # Use eval to expand a potential ~
48697      eval path="$path"
48698      if test ! -f "$path" && test ! -d "$path"; then
48699        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48700      fi
48701
48702      if test -d "$path"; then
48703        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48704      else
48705        dir="`$DIRNAME "$path"`"
48706        base="`$BASENAME "$path"`"
48707        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48708      fi
48709    fi
48710  fi
48711
48712      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48713$as_echo_n "checking for $DLL_NAME... " >&6; }
48714      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48715$as_echo "$MSVC_DLL" >&6; }
48716    else
48717      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48718$as_echo "incorrect, ignoring" >&6; }
48719      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48720$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48721    fi
48722  fi
48723
48724    fi
48725  fi
48726
48727  if test "x$MSVC_DLL" = x; then
48728    # Probe: Check in the Boot JDK directory.
48729    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
48730
48731  DLL_NAME="$DLL_NAME"
48732  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48733  METHOD="well-known location in Boot JDK"
48734  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48735    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48736$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48737
48738    # Need to check if the found msvcr is correct architecture
48739    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48740$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48741    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48742    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48743      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48744      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48745      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48746        CORRECT_MSVCR_ARCH="PE32 executable"
48747      else
48748        CORRECT_MSVCR_ARCH="PE32+ executable"
48749      fi
48750    else
48751      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48752        CORRECT_MSVCR_ARCH=386
48753      else
48754        CORRECT_MSVCR_ARCH=x86-64
48755      fi
48756    fi
48757    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48759$as_echo "ok" >&6; }
48760      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48761
48762  # Only process if variable expands to non-empty
48763
48764  if test "x$MSVC_DLL" != x; then
48765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48766
48767  # Input might be given as Windows format, start by converting to
48768  # unix format.
48769  path="$MSVC_DLL"
48770  new_path=`$CYGPATH -u "$path"`
48771
48772  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48773  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48774  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48775  # "foo.exe" is OK but "foo" is an error.
48776  #
48777  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48778  # It is also a way to make sure we got the proper file name for the real test later on.
48779  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48780  if test "x$test_shortpath" = x; then
48781    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48782$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48783    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48784  fi
48785
48786  # Call helper function which possibly converts this using DOS-style short mode.
48787  # If so, the updated path is stored in $new_path.
48788
48789  input_path="$new_path"
48790  # Check if we need to convert this using DOS-style short mode. If the path
48791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48792  # take no chances and rewrite it.
48793  # Note: m4 eats our [], so we need to use [ and ] instead.
48794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48795  if test "x$has_forbidden_chars" != x; then
48796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48797    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48798    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48799    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48800      # Going to short mode and back again did indeed matter. Since short mode is
48801      # case insensitive, let's make it lowercase to improve readability.
48802      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48803      # Now convert it back to Unix-style (cygpath)
48804      input_path=`$CYGPATH -u "$shortmode_path"`
48805      new_path="$input_path"
48806    fi
48807  fi
48808
48809  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48810  if test "x$test_cygdrive_prefix" = x; then
48811    # As a simple fix, exclude /usr/bin since it's not a real path.
48812    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48813      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48814      # a path prefixed by /cygdrive for fixpath to work.
48815      new_path="$CYGWIN_ROOT_PATH$input_path"
48816    fi
48817  fi
48818
48819
48820  if test "x$path" != "x$new_path"; then
48821    MSVC_DLL="$new_path"
48822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48823$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48824  fi
48825
48826    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48827
48828  path="$MSVC_DLL"
48829  has_colon=`$ECHO $path | $GREP ^.:`
48830  new_path="$path"
48831  if test "x$has_colon" = x; then
48832    # Not in mixed or Windows style, start by that.
48833    new_path=`cmd //c echo $path`
48834  fi
48835
48836
48837  input_path="$new_path"
48838  # Check if we need to convert this using DOS-style short mode. If the path
48839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48840  # take no chances and rewrite it.
48841  # Note: m4 eats our [], so we need to use [ and ] instead.
48842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48843  if test "x$has_forbidden_chars" != x; then
48844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48845    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48846  fi
48847
48848
48849  windows_path="$new_path"
48850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48851    unix_path=`$CYGPATH -u "$windows_path"`
48852    new_path="$unix_path"
48853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48855    new_path="$unix_path"
48856  fi
48857
48858  if test "x$path" != "x$new_path"; then
48859    MSVC_DLL="$new_path"
48860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48861$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48862  fi
48863
48864  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48865  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48866
48867    else
48868      # We're on a unix platform. Hooray! :)
48869      path="$MSVC_DLL"
48870      has_space=`$ECHO "$path" | $GREP " "`
48871      if test "x$has_space" != x; then
48872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48873$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48874        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48875      fi
48876
48877      # Use eval to expand a potential ~
48878      eval path="$path"
48879      if test ! -f "$path" && test ! -d "$path"; then
48880        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48881      fi
48882
48883      if test -d "$path"; then
48884        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48885      else
48886        dir="`$DIRNAME "$path"`"
48887        base="`$BASENAME "$path"`"
48888        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48889      fi
48890    fi
48891  fi
48892
48893      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48894$as_echo_n "checking for $DLL_NAME... " >&6; }
48895      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48896$as_echo "$MSVC_DLL" >&6; }
48897    else
48898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48899$as_echo "incorrect, ignoring" >&6; }
48900      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48901$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48902    fi
48903  fi
48904
48905  fi
48906
48907  if test "x$MSVC_DLL" = x; then
48908    # Probe: Look in the Windows system32 directory
48909    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48910
48911  windows_path="$CYGWIN_SYSTEMROOT"
48912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48913    unix_path=`$CYGPATH -u "$windows_path"`
48914    CYGWIN_SYSTEMROOT="$unix_path"
48915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48917    CYGWIN_SYSTEMROOT="$unix_path"
48918  fi
48919
48920    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
48921
48922  DLL_NAME="$DLL_NAME"
48923  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48924  METHOD="well-known location in SYSTEMROOT"
48925  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48926    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48927$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48928
48929    # Need to check if the found msvcr is correct architecture
48930    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48931$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48932    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48934      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48935      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48936      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48937        CORRECT_MSVCR_ARCH="PE32 executable"
48938      else
48939        CORRECT_MSVCR_ARCH="PE32+ executable"
48940      fi
48941    else
48942      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48943        CORRECT_MSVCR_ARCH=386
48944      else
48945        CORRECT_MSVCR_ARCH=x86-64
48946      fi
48947    fi
48948    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48949      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48950$as_echo "ok" >&6; }
48951      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48952
48953  # Only process if variable expands to non-empty
48954
48955  if test "x$MSVC_DLL" != x; then
48956    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48957
48958  # Input might be given as Windows format, start by converting to
48959  # unix format.
48960  path="$MSVC_DLL"
48961  new_path=`$CYGPATH -u "$path"`
48962
48963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48966  # "foo.exe" is OK but "foo" is an error.
48967  #
48968  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48969  # It is also a way to make sure we got the proper file name for the real test later on.
48970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48971  if test "x$test_shortpath" = x; then
48972    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48973$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48974    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48975  fi
48976
48977  # Call helper function which possibly converts this using DOS-style short mode.
48978  # If so, the updated path is stored in $new_path.
48979
48980  input_path="$new_path"
48981  # Check if we need to convert this using DOS-style short mode. If the path
48982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48983  # take no chances and rewrite it.
48984  # Note: m4 eats our [], so we need to use [ and ] instead.
48985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48986  if test "x$has_forbidden_chars" != x; then
48987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48991      # Going to short mode and back again did indeed matter. Since short mode is
48992      # case insensitive, let's make it lowercase to improve readability.
48993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48994      # Now convert it back to Unix-style (cygpath)
48995      input_path=`$CYGPATH -u "$shortmode_path"`
48996      new_path="$input_path"
48997    fi
48998  fi
48999
49000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49001  if test "x$test_cygdrive_prefix" = x; then
49002    # As a simple fix, exclude /usr/bin since it's not a real path.
49003    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49005      # a path prefixed by /cygdrive for fixpath to work.
49006      new_path="$CYGWIN_ROOT_PATH$input_path"
49007    fi
49008  fi
49009
49010
49011  if test "x$path" != "x$new_path"; then
49012    MSVC_DLL="$new_path"
49013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49014$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49015  fi
49016
49017    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49018
49019  path="$MSVC_DLL"
49020  has_colon=`$ECHO $path | $GREP ^.:`
49021  new_path="$path"
49022  if test "x$has_colon" = x; then
49023    # Not in mixed or Windows style, start by that.
49024    new_path=`cmd //c echo $path`
49025  fi
49026
49027
49028  input_path="$new_path"
49029  # Check if we need to convert this using DOS-style short mode. If the path
49030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49031  # take no chances and rewrite it.
49032  # Note: m4 eats our [], so we need to use [ and ] instead.
49033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49034  if test "x$has_forbidden_chars" != x; then
49035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49037  fi
49038
49039
49040  windows_path="$new_path"
49041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49042    unix_path=`$CYGPATH -u "$windows_path"`
49043    new_path="$unix_path"
49044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49046    new_path="$unix_path"
49047  fi
49048
49049  if test "x$path" != "x$new_path"; then
49050    MSVC_DLL="$new_path"
49051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49052$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49053  fi
49054
49055  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49056  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49057
49058    else
49059      # We're on a unix platform. Hooray! :)
49060      path="$MSVC_DLL"
49061      has_space=`$ECHO "$path" | $GREP " "`
49062      if test "x$has_space" != x; then
49063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49064$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49065        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49066      fi
49067
49068      # Use eval to expand a potential ~
49069      eval path="$path"
49070      if test ! -f "$path" && test ! -d "$path"; then
49071        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49072      fi
49073
49074      if test -d "$path"; then
49075        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49076      else
49077        dir="`$DIRNAME "$path"`"
49078        base="`$BASENAME "$path"`"
49079        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49080      fi
49081    fi
49082  fi
49083
49084      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49085$as_echo_n "checking for $DLL_NAME... " >&6; }
49086      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49087$as_echo "$MSVC_DLL" >&6; }
49088    else
49089      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49090$as_echo "incorrect, ignoring" >&6; }
49091      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49092$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49093    fi
49094  fi
49095
49096  fi
49097
49098  if test "x$MSVC_DLL" = x; then
49099    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49100    if test "x$VS100COMNTOOLS" != x; then
49101      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49102
49103  windows_path="$CYGWIN_VS_TOOLS_DIR"
49104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49105    unix_path=`$CYGPATH -u "$windows_path"`
49106    CYGWIN_VS_TOOLS_DIR="$unix_path"
49107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49109    CYGWIN_VS_TOOLS_DIR="$unix_path"
49110  fi
49111
49112      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49113        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49114	    | $GREP -i /x64/ | $HEAD --lines 1`
49115      else
49116        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49117	    | $GREP -i /x86/ | $HEAD --lines 1`
49118      fi
49119
49120  DLL_NAME="$DLL_NAME"
49121  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49122  METHOD="search of VS100COMNTOOLS"
49123  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49124    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49125$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49126
49127    # Need to check if the found msvcr is correct architecture
49128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49129$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49130    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49132      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49133      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49134      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49135        CORRECT_MSVCR_ARCH="PE32 executable"
49136      else
49137        CORRECT_MSVCR_ARCH="PE32+ executable"
49138      fi
49139    else
49140      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49141        CORRECT_MSVCR_ARCH=386
49142      else
49143        CORRECT_MSVCR_ARCH=x86-64
49144      fi
49145    fi
49146    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49147      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49148$as_echo "ok" >&6; }
49149      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49150
49151  # Only process if variable expands to non-empty
49152
49153  if test "x$MSVC_DLL" != x; then
49154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49155
49156  # Input might be given as Windows format, start by converting to
49157  # unix format.
49158  path="$MSVC_DLL"
49159  new_path=`$CYGPATH -u "$path"`
49160
49161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49164  # "foo.exe" is OK but "foo" is an error.
49165  #
49166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49167  # It is also a way to make sure we got the proper file name for the real test later on.
49168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49169  if test "x$test_shortpath" = x; then
49170    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49171$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49172    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49173  fi
49174
49175  # Call helper function which possibly converts this using DOS-style short mode.
49176  # If so, the updated path is stored in $new_path.
49177
49178  input_path="$new_path"
49179  # Check if we need to convert this using DOS-style short mode. If the path
49180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49181  # take no chances and rewrite it.
49182  # Note: m4 eats our [], so we need to use [ and ] instead.
49183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49184  if test "x$has_forbidden_chars" != x; then
49185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49186    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49187    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49188    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49189      # Going to short mode and back again did indeed matter. Since short mode is
49190      # case insensitive, let's make it lowercase to improve readability.
49191      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49192      # Now convert it back to Unix-style (cygpath)
49193      input_path=`$CYGPATH -u "$shortmode_path"`
49194      new_path="$input_path"
49195    fi
49196  fi
49197
49198  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49199  if test "x$test_cygdrive_prefix" = x; then
49200    # As a simple fix, exclude /usr/bin since it's not a real path.
49201    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49202      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49203      # a path prefixed by /cygdrive for fixpath to work.
49204      new_path="$CYGWIN_ROOT_PATH$input_path"
49205    fi
49206  fi
49207
49208
49209  if test "x$path" != "x$new_path"; then
49210    MSVC_DLL="$new_path"
49211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49212$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49213  fi
49214
49215    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49216
49217  path="$MSVC_DLL"
49218  has_colon=`$ECHO $path | $GREP ^.:`
49219  new_path="$path"
49220  if test "x$has_colon" = x; then
49221    # Not in mixed or Windows style, start by that.
49222    new_path=`cmd //c echo $path`
49223  fi
49224
49225
49226  input_path="$new_path"
49227  # Check if we need to convert this using DOS-style short mode. If the path
49228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49229  # take no chances and rewrite it.
49230  # Note: m4 eats our [], so we need to use [ and ] instead.
49231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49232  if test "x$has_forbidden_chars" != x; then
49233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49235  fi
49236
49237
49238  windows_path="$new_path"
49239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49240    unix_path=`$CYGPATH -u "$windows_path"`
49241    new_path="$unix_path"
49242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49244    new_path="$unix_path"
49245  fi
49246
49247  if test "x$path" != "x$new_path"; then
49248    MSVC_DLL="$new_path"
49249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49250$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49251  fi
49252
49253  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49254  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49255
49256    else
49257      # We're on a unix platform. Hooray! :)
49258      path="$MSVC_DLL"
49259      has_space=`$ECHO "$path" | $GREP " "`
49260      if test "x$has_space" != x; then
49261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49262$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49263        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49264      fi
49265
49266      # Use eval to expand a potential ~
49267      eval path="$path"
49268      if test ! -f "$path" && test ! -d "$path"; then
49269        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49270      fi
49271
49272      if test -d "$path"; then
49273        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49274      else
49275        dir="`$DIRNAME "$path"`"
49276        base="`$BASENAME "$path"`"
49277        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49278      fi
49279    fi
49280  fi
49281
49282      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49283$as_echo_n "checking for $DLL_NAME... " >&6; }
49284      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49285$as_echo "$MSVC_DLL" >&6; }
49286    else
49287      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49288$as_echo "incorrect, ignoring" >&6; }
49289      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49290$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49291    fi
49292  fi
49293
49294    fi
49295  fi
49296
49297  if test "x$MSVC_DLL" = x; then
49298    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49299    # (This was the original behaviour; kept since it might turn something up)
49300    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49301      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49302        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49303	    | $GREP x64 | $HEAD --lines 1`
49304      else
49305        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49306	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49307        if test "x$POSSIBLE_MSVC_DLL" = x; then
49308          # We're grasping at straws now...
49309          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49310	      | $HEAD --lines 1`
49311        fi
49312      fi
49313
49314
49315  DLL_NAME="$DLL_NAME"
49316  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49317  METHOD="search of VCINSTALLDIR"
49318  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49319    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49320$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49321
49322    # Need to check if the found msvcr is correct architecture
49323    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49324$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49325    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49326    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49327      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49328      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49329      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49330        CORRECT_MSVCR_ARCH="PE32 executable"
49331      else
49332        CORRECT_MSVCR_ARCH="PE32+ executable"
49333      fi
49334    else
49335      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49336        CORRECT_MSVCR_ARCH=386
49337      else
49338        CORRECT_MSVCR_ARCH=x86-64
49339      fi
49340    fi
49341    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49342      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49343$as_echo "ok" >&6; }
49344      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49345
49346  # Only process if variable expands to non-empty
49347
49348  if test "x$MSVC_DLL" != x; then
49349    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49350
49351  # Input might be given as Windows format, start by converting to
49352  # unix format.
49353  path="$MSVC_DLL"
49354  new_path=`$CYGPATH -u "$path"`
49355
49356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49359  # "foo.exe" is OK but "foo" is an error.
49360  #
49361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49362  # It is also a way to make sure we got the proper file name for the real test later on.
49363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49364  if test "x$test_shortpath" = x; then
49365    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49366$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49367    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49368  fi
49369
49370  # Call helper function which possibly converts this using DOS-style short mode.
49371  # If so, the updated path is stored in $new_path.
49372
49373  input_path="$new_path"
49374  # Check if we need to convert this using DOS-style short mode. If the path
49375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49376  # take no chances and rewrite it.
49377  # Note: m4 eats our [], so we need to use [ and ] instead.
49378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49379  if test "x$has_forbidden_chars" != x; then
49380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49384      # Going to short mode and back again did indeed matter. Since short mode is
49385      # case insensitive, let's make it lowercase to improve readability.
49386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49387      # Now convert it back to Unix-style (cygpath)
49388      input_path=`$CYGPATH -u "$shortmode_path"`
49389      new_path="$input_path"
49390    fi
49391  fi
49392
49393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49394  if test "x$test_cygdrive_prefix" = x; then
49395    # As a simple fix, exclude /usr/bin since it's not a real path.
49396    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49398      # a path prefixed by /cygdrive for fixpath to work.
49399      new_path="$CYGWIN_ROOT_PATH$input_path"
49400    fi
49401  fi
49402
49403
49404  if test "x$path" != "x$new_path"; then
49405    MSVC_DLL="$new_path"
49406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49407$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49408  fi
49409
49410    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49411
49412  path="$MSVC_DLL"
49413  has_colon=`$ECHO $path | $GREP ^.:`
49414  new_path="$path"
49415  if test "x$has_colon" = x; then
49416    # Not in mixed or Windows style, start by that.
49417    new_path=`cmd //c echo $path`
49418  fi
49419
49420
49421  input_path="$new_path"
49422  # Check if we need to convert this using DOS-style short mode. If the path
49423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49424  # take no chances and rewrite it.
49425  # Note: m4 eats our [], so we need to use [ and ] instead.
49426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49427  if test "x$has_forbidden_chars" != x; then
49428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49430  fi
49431
49432
49433  windows_path="$new_path"
49434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49435    unix_path=`$CYGPATH -u "$windows_path"`
49436    new_path="$unix_path"
49437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49439    new_path="$unix_path"
49440  fi
49441
49442  if test "x$path" != "x$new_path"; then
49443    MSVC_DLL="$new_path"
49444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49445$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49446  fi
49447
49448  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49449  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49450
49451    else
49452      # We're on a unix platform. Hooray! :)
49453      path="$MSVC_DLL"
49454      has_space=`$ECHO "$path" | $GREP " "`
49455      if test "x$has_space" != x; then
49456        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49457$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49458        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49459      fi
49460
49461      # Use eval to expand a potential ~
49462      eval path="$path"
49463      if test ! -f "$path" && test ! -d "$path"; then
49464        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49465      fi
49466
49467      if test -d "$path"; then
49468        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49469      else
49470        dir="`$DIRNAME "$path"`"
49471        base="`$BASENAME "$path"`"
49472        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49473      fi
49474    fi
49475  fi
49476
49477      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49478$as_echo_n "checking for $DLL_NAME... " >&6; }
49479      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49480$as_echo "$MSVC_DLL" >&6; }
49481    else
49482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49483$as_echo "incorrect, ignoring" >&6; }
49484      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49485$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49486    fi
49487  fi
49488
49489    fi
49490  fi
49491
49492  if test "x$MSVC_DLL" = x; then
49493    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49494$as_echo_n "checking for $DLL_NAME... " >&6; }
49495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49496$as_echo "no" >&6; }
49497    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
49498  fi
49499
49500    MSVCR_DLL="$MSVC_DLL"
49501  fi
49502
49503
49504
49505# Check whether --with-msvcp-dll was given.
49506if test "${with_msvcp_dll+set}" = set; then :
49507  withval=$with_msvcp_dll;
49508fi
49509
49510
49511  if test "x$MSVCP_NAME" != "x"; then
49512    if test "x$with_msvcp_dll" != x; then
49513      # If given explicitely by user, do not probe. If not present, fail directly.
49514
49515  DLL_NAME="$MSVCP_NAME"
49516  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
49517  METHOD="--with-msvcp-dll"
49518  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49519    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49520$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49521
49522    # Need to check if the found msvcr is correct architecture
49523    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49524$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49525    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49526    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49527      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49528      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49529      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49530        CORRECT_MSVCR_ARCH="PE32 executable"
49531      else
49532        CORRECT_MSVCR_ARCH="PE32+ executable"
49533      fi
49534    else
49535      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49536        CORRECT_MSVCR_ARCH=386
49537      else
49538        CORRECT_MSVCR_ARCH=x86-64
49539      fi
49540    fi
49541    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49542      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49543$as_echo "ok" >&6; }
49544      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49545
49546  # Only process if variable expands to non-empty
49547
49548  if test "x$MSVC_DLL" != x; then
49549    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49550
49551  # Input might be given as Windows format, start by converting to
49552  # unix format.
49553  path="$MSVC_DLL"
49554  new_path=`$CYGPATH -u "$path"`
49555
49556  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49557  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49558  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49559  # "foo.exe" is OK but "foo" is an error.
49560  #
49561  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49562  # It is also a way to make sure we got the proper file name for the real test later on.
49563  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49564  if test "x$test_shortpath" = x; then
49565    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49566$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49567    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49568  fi
49569
49570  # Call helper function which possibly converts this using DOS-style short mode.
49571  # If so, the updated path is stored in $new_path.
49572
49573  input_path="$new_path"
49574  # Check if we need to convert this using DOS-style short mode. If the path
49575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49576  # take no chances and rewrite it.
49577  # Note: m4 eats our [], so we need to use [ and ] instead.
49578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49579  if test "x$has_forbidden_chars" != x; then
49580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49581    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49582    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49583    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49584      # Going to short mode and back again did indeed matter. Since short mode is
49585      # case insensitive, let's make it lowercase to improve readability.
49586      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49587      # Now convert it back to Unix-style (cygpath)
49588      input_path=`$CYGPATH -u "$shortmode_path"`
49589      new_path="$input_path"
49590    fi
49591  fi
49592
49593  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49594  if test "x$test_cygdrive_prefix" = x; then
49595    # As a simple fix, exclude /usr/bin since it's not a real path.
49596    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49597      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49598      # a path prefixed by /cygdrive for fixpath to work.
49599      new_path="$CYGWIN_ROOT_PATH$input_path"
49600    fi
49601  fi
49602
49603
49604  if test "x$path" != "x$new_path"; then
49605    MSVC_DLL="$new_path"
49606    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49607$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49608  fi
49609
49610    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49611
49612  path="$MSVC_DLL"
49613  has_colon=`$ECHO $path | $GREP ^.:`
49614  new_path="$path"
49615  if test "x$has_colon" = x; then
49616    # Not in mixed or Windows style, start by that.
49617    new_path=`cmd //c echo $path`
49618  fi
49619
49620
49621  input_path="$new_path"
49622  # Check if we need to convert this using DOS-style short mode. If the path
49623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49624  # take no chances and rewrite it.
49625  # Note: m4 eats our [], so we need to use [ and ] instead.
49626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49627  if test "x$has_forbidden_chars" != x; then
49628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49629    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49630  fi
49631
49632
49633  windows_path="$new_path"
49634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49635    unix_path=`$CYGPATH -u "$windows_path"`
49636    new_path="$unix_path"
49637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49639    new_path="$unix_path"
49640  fi
49641
49642  if test "x$path" != "x$new_path"; then
49643    MSVC_DLL="$new_path"
49644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49645$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49646  fi
49647
49648  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49649  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49650
49651    else
49652      # We're on a unix platform. Hooray! :)
49653      path="$MSVC_DLL"
49654      has_space=`$ECHO "$path" | $GREP " "`
49655      if test "x$has_space" != x; then
49656        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49657$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49658        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49659      fi
49660
49661      # Use eval to expand a potential ~
49662      eval path="$path"
49663      if test ! -f "$path" && test ! -d "$path"; then
49664        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49665      fi
49666
49667      if test -d "$path"; then
49668        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49669      else
49670        dir="`$DIRNAME "$path"`"
49671        base="`$BASENAME "$path"`"
49672        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49673      fi
49674    fi
49675  fi
49676
49677      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49678$as_echo_n "checking for $DLL_NAME... " >&6; }
49679      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49680$as_echo "$MSVC_DLL" >&6; }
49681    else
49682      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49683$as_echo "incorrect, ignoring" >&6; }
49684      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49685$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49686    fi
49687  fi
49688
49689      if test "x$MSVC_DLL" = x; then
49690        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
49691      fi
49692      MSVCP_DLL="$MSVC_DLL"
49693    elif test "x$DEVKIT_MSVCP_DLL" != x; then
49694
49695  DLL_NAME="$MSVCP_NAME"
49696  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
49697  METHOD="devkit"
49698  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49699    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49700$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49701
49702    # Need to check if the found msvcr is correct architecture
49703    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49704$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49705    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49706    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49707      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49708      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49709      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49710        CORRECT_MSVCR_ARCH="PE32 executable"
49711      else
49712        CORRECT_MSVCR_ARCH="PE32+ executable"
49713      fi
49714    else
49715      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49716        CORRECT_MSVCR_ARCH=386
49717      else
49718        CORRECT_MSVCR_ARCH=x86-64
49719      fi
49720    fi
49721    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49722      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49723$as_echo "ok" >&6; }
49724      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49725
49726  # Only process if variable expands to non-empty
49727
49728  if test "x$MSVC_DLL" != x; then
49729    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49730
49731  # Input might be given as Windows format, start by converting to
49732  # unix format.
49733  path="$MSVC_DLL"
49734  new_path=`$CYGPATH -u "$path"`
49735
49736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49739  # "foo.exe" is OK but "foo" is an error.
49740  #
49741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49742  # It is also a way to make sure we got the proper file name for the real test later on.
49743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49744  if test "x$test_shortpath" = x; then
49745    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49746$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49747    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49748  fi
49749
49750  # Call helper function which possibly converts this using DOS-style short mode.
49751  # If so, the updated path is stored in $new_path.
49752
49753  input_path="$new_path"
49754  # Check if we need to convert this using DOS-style short mode. If the path
49755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49756  # take no chances and rewrite it.
49757  # Note: m4 eats our [], so we need to use [ and ] instead.
49758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49759  if test "x$has_forbidden_chars" != x; then
49760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49761    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49762    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49763    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49764      # Going to short mode and back again did indeed matter. Since short mode is
49765      # case insensitive, let's make it lowercase to improve readability.
49766      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49767      # Now convert it back to Unix-style (cygpath)
49768      input_path=`$CYGPATH -u "$shortmode_path"`
49769      new_path="$input_path"
49770    fi
49771  fi
49772
49773  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49774  if test "x$test_cygdrive_prefix" = x; then
49775    # As a simple fix, exclude /usr/bin since it's not a real path.
49776    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49777      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49778      # a path prefixed by /cygdrive for fixpath to work.
49779      new_path="$CYGWIN_ROOT_PATH$input_path"
49780    fi
49781  fi
49782
49783
49784  if test "x$path" != "x$new_path"; then
49785    MSVC_DLL="$new_path"
49786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49787$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49788  fi
49789
49790    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49791
49792  path="$MSVC_DLL"
49793  has_colon=`$ECHO $path | $GREP ^.:`
49794  new_path="$path"
49795  if test "x$has_colon" = x; then
49796    # Not in mixed or Windows style, start by that.
49797    new_path=`cmd //c echo $path`
49798  fi
49799
49800
49801  input_path="$new_path"
49802  # Check if we need to convert this using DOS-style short mode. If the path
49803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49804  # take no chances and rewrite it.
49805  # Note: m4 eats our [], so we need to use [ and ] instead.
49806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49807  if test "x$has_forbidden_chars" != x; then
49808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49810  fi
49811
49812
49813  windows_path="$new_path"
49814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49815    unix_path=`$CYGPATH -u "$windows_path"`
49816    new_path="$unix_path"
49817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49819    new_path="$unix_path"
49820  fi
49821
49822  if test "x$path" != "x$new_path"; then
49823    MSVC_DLL="$new_path"
49824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49825$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49826  fi
49827
49828  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49829  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49830
49831    else
49832      # We're on a unix platform. Hooray! :)
49833      path="$MSVC_DLL"
49834      has_space=`$ECHO "$path" | $GREP " "`
49835      if test "x$has_space" != x; then
49836        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49837$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49838        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49839      fi
49840
49841      # Use eval to expand a potential ~
49842      eval path="$path"
49843      if test ! -f "$path" && test ! -d "$path"; then
49844        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49845      fi
49846
49847      if test -d "$path"; then
49848        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49849      else
49850        dir="`$DIRNAME "$path"`"
49851        base="`$BASENAME "$path"`"
49852        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49853      fi
49854    fi
49855  fi
49856
49857      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49858$as_echo_n "checking for $DLL_NAME... " >&6; }
49859      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49860$as_echo "$MSVC_DLL" >&6; }
49861    else
49862      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49863$as_echo "incorrect, ignoring" >&6; }
49864      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49865$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49866    fi
49867  fi
49868
49869      if test "x$MSVC_DLL" = x; then
49870        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
49871      fi
49872      MSVCP_DLL="$MSVC_DLL"
49873    else
49874
49875  DLL_NAME="${MSVCP_NAME}"
49876  MSVC_DLL=
49877
49878  if test "x$MSVC_DLL" = x; then
49879    # Probe: Using well-known location from Visual Studio 10.0
49880    if test "x$VCINSTALLDIR" != x; then
49881      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49882
49883  windows_path="$CYGWIN_VC_INSTALL_DIR"
49884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49885    unix_path=`$CYGPATH -u "$windows_path"`
49886    CYGWIN_VC_INSTALL_DIR="$unix_path"
49887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49889    CYGWIN_VC_INSTALL_DIR="$unix_path"
49890  fi
49891
49892      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49893        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49894      else
49895        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49896      fi
49897      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49898
49899  DLL_NAME="$DLL_NAME"
49900  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49901  METHOD="well-known location in VCINSTALLDIR"
49902  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49903    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49904$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49905
49906    # Need to check if the found msvcr is correct architecture
49907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49908$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49909    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49910    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49911      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49912      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49913      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49914        CORRECT_MSVCR_ARCH="PE32 executable"
49915      else
49916        CORRECT_MSVCR_ARCH="PE32+ executable"
49917      fi
49918    else
49919      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49920        CORRECT_MSVCR_ARCH=386
49921      else
49922        CORRECT_MSVCR_ARCH=x86-64
49923      fi
49924    fi
49925    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49926      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49927$as_echo "ok" >&6; }
49928      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49929
49930  # Only process if variable expands to non-empty
49931
49932  if test "x$MSVC_DLL" != x; then
49933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49934
49935  # Input might be given as Windows format, start by converting to
49936  # unix format.
49937  path="$MSVC_DLL"
49938  new_path=`$CYGPATH -u "$path"`
49939
49940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49943  # "foo.exe" is OK but "foo" is an error.
49944  #
49945  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49946  # It is also a way to make sure we got the proper file name for the real test later on.
49947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49948  if test "x$test_shortpath" = x; then
49949    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49950$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49951    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49952  fi
49953
49954  # Call helper function which possibly converts this using DOS-style short mode.
49955  # If so, the updated path is stored in $new_path.
49956
49957  input_path="$new_path"
49958  # Check if we need to convert this using DOS-style short mode. If the path
49959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49960  # take no chances and rewrite it.
49961  # Note: m4 eats our [], so we need to use [ and ] instead.
49962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49963  if test "x$has_forbidden_chars" != x; then
49964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49965    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49966    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49967    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49968      # Going to short mode and back again did indeed matter. Since short mode is
49969      # case insensitive, let's make it lowercase to improve readability.
49970      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49971      # Now convert it back to Unix-style (cygpath)
49972      input_path=`$CYGPATH -u "$shortmode_path"`
49973      new_path="$input_path"
49974    fi
49975  fi
49976
49977  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49978  if test "x$test_cygdrive_prefix" = x; then
49979    # As a simple fix, exclude /usr/bin since it's not a real path.
49980    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49981      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49982      # a path prefixed by /cygdrive for fixpath to work.
49983      new_path="$CYGWIN_ROOT_PATH$input_path"
49984    fi
49985  fi
49986
49987
49988  if test "x$path" != "x$new_path"; then
49989    MSVC_DLL="$new_path"
49990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49991$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49992  fi
49993
49994    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49995
49996  path="$MSVC_DLL"
49997  has_colon=`$ECHO $path | $GREP ^.:`
49998  new_path="$path"
49999  if test "x$has_colon" = x; then
50000    # Not in mixed or Windows style, start by that.
50001    new_path=`cmd //c echo $path`
50002  fi
50003
50004
50005  input_path="$new_path"
50006  # Check if we need to convert this using DOS-style short mode. If the path
50007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50008  # take no chances and rewrite it.
50009  # Note: m4 eats our [], so we need to use [ and ] instead.
50010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50011  if test "x$has_forbidden_chars" != x; then
50012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50014  fi
50015
50016
50017  windows_path="$new_path"
50018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50019    unix_path=`$CYGPATH -u "$windows_path"`
50020    new_path="$unix_path"
50021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50023    new_path="$unix_path"
50024  fi
50025
50026  if test "x$path" != "x$new_path"; then
50027    MSVC_DLL="$new_path"
50028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50029$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50030  fi
50031
50032  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50033  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50034
50035    else
50036      # We're on a unix platform. Hooray! :)
50037      path="$MSVC_DLL"
50038      has_space=`$ECHO "$path" | $GREP " "`
50039      if test "x$has_space" != x; then
50040        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50041$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50042        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50043      fi
50044
50045      # Use eval to expand a potential ~
50046      eval path="$path"
50047      if test ! -f "$path" && test ! -d "$path"; then
50048        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50049      fi
50050
50051      if test -d "$path"; then
50052        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50053      else
50054        dir="`$DIRNAME "$path"`"
50055        base="`$BASENAME "$path"`"
50056        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50057      fi
50058    fi
50059  fi
50060
50061      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50062$as_echo_n "checking for $DLL_NAME... " >&6; }
50063      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50064$as_echo "$MSVC_DLL" >&6; }
50065    else
50066      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50067$as_echo "incorrect, ignoring" >&6; }
50068      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50069$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50070    fi
50071  fi
50072
50073    fi
50074  fi
50075
50076  if test "x$MSVC_DLL" = x; then
50077    # Probe: Check in the Boot JDK directory.
50078    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50079
50080  DLL_NAME="$DLL_NAME"
50081  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50082  METHOD="well-known location in Boot JDK"
50083  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50084    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50085$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50086
50087    # Need to check if the found msvcr is correct architecture
50088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50089$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50090    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50091    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50092      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50093      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50094      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50095        CORRECT_MSVCR_ARCH="PE32 executable"
50096      else
50097        CORRECT_MSVCR_ARCH="PE32+ executable"
50098      fi
50099    else
50100      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50101        CORRECT_MSVCR_ARCH=386
50102      else
50103        CORRECT_MSVCR_ARCH=x86-64
50104      fi
50105    fi
50106    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50107      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50108$as_echo "ok" >&6; }
50109      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50110
50111  # Only process if variable expands to non-empty
50112
50113  if test "x$MSVC_DLL" != x; then
50114    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50115
50116  # Input might be given as Windows format, start by converting to
50117  # unix format.
50118  path="$MSVC_DLL"
50119  new_path=`$CYGPATH -u "$path"`
50120
50121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50124  # "foo.exe" is OK but "foo" is an error.
50125  #
50126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50127  # It is also a way to make sure we got the proper file name for the real test later on.
50128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50129  if test "x$test_shortpath" = x; then
50130    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50131$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50132    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50133  fi
50134
50135  # Call helper function which possibly converts this using DOS-style short mode.
50136  # If so, the updated path is stored in $new_path.
50137
50138  input_path="$new_path"
50139  # Check if we need to convert this using DOS-style short mode. If the path
50140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50141  # take no chances and rewrite it.
50142  # Note: m4 eats our [], so we need to use [ and ] instead.
50143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50144  if test "x$has_forbidden_chars" != x; then
50145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50149      # Going to short mode and back again did indeed matter. Since short mode is
50150      # case insensitive, let's make it lowercase to improve readability.
50151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50152      # Now convert it back to Unix-style (cygpath)
50153      input_path=`$CYGPATH -u "$shortmode_path"`
50154      new_path="$input_path"
50155    fi
50156  fi
50157
50158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50159  if test "x$test_cygdrive_prefix" = x; then
50160    # As a simple fix, exclude /usr/bin since it's not a real path.
50161    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50163      # a path prefixed by /cygdrive for fixpath to work.
50164      new_path="$CYGWIN_ROOT_PATH$input_path"
50165    fi
50166  fi
50167
50168
50169  if test "x$path" != "x$new_path"; then
50170    MSVC_DLL="$new_path"
50171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50172$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50173  fi
50174
50175    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50176
50177  path="$MSVC_DLL"
50178  has_colon=`$ECHO $path | $GREP ^.:`
50179  new_path="$path"
50180  if test "x$has_colon" = x; then
50181    # Not in mixed or Windows style, start by that.
50182    new_path=`cmd //c echo $path`
50183  fi
50184
50185
50186  input_path="$new_path"
50187  # Check if we need to convert this using DOS-style short mode. If the path
50188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50189  # take no chances and rewrite it.
50190  # Note: m4 eats our [], so we need to use [ and ] instead.
50191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50192  if test "x$has_forbidden_chars" != x; then
50193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50195  fi
50196
50197
50198  windows_path="$new_path"
50199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50200    unix_path=`$CYGPATH -u "$windows_path"`
50201    new_path="$unix_path"
50202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50204    new_path="$unix_path"
50205  fi
50206
50207  if test "x$path" != "x$new_path"; then
50208    MSVC_DLL="$new_path"
50209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50210$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50211  fi
50212
50213  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50214  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50215
50216    else
50217      # We're on a unix platform. Hooray! :)
50218      path="$MSVC_DLL"
50219      has_space=`$ECHO "$path" | $GREP " "`
50220      if test "x$has_space" != x; then
50221        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50222$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50223        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50224      fi
50225
50226      # Use eval to expand a potential ~
50227      eval path="$path"
50228      if test ! -f "$path" && test ! -d "$path"; then
50229        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50230      fi
50231
50232      if test -d "$path"; then
50233        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50234      else
50235        dir="`$DIRNAME "$path"`"
50236        base="`$BASENAME "$path"`"
50237        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50238      fi
50239    fi
50240  fi
50241
50242      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50243$as_echo_n "checking for $DLL_NAME... " >&6; }
50244      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50245$as_echo "$MSVC_DLL" >&6; }
50246    else
50247      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50248$as_echo "incorrect, ignoring" >&6; }
50249      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50250$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50251    fi
50252  fi
50253
50254  fi
50255
50256  if test "x$MSVC_DLL" = x; then
50257    # Probe: Look in the Windows system32 directory
50258    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50259
50260  windows_path="$CYGWIN_SYSTEMROOT"
50261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50262    unix_path=`$CYGPATH -u "$windows_path"`
50263    CYGWIN_SYSTEMROOT="$unix_path"
50264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50266    CYGWIN_SYSTEMROOT="$unix_path"
50267  fi
50268
50269    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50270
50271  DLL_NAME="$DLL_NAME"
50272  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50273  METHOD="well-known location in SYSTEMROOT"
50274  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50275    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50276$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50277
50278    # Need to check if the found msvcr is correct architecture
50279    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50280$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50281    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50283      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50284      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50285      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50286        CORRECT_MSVCR_ARCH="PE32 executable"
50287      else
50288        CORRECT_MSVCR_ARCH="PE32+ executable"
50289      fi
50290    else
50291      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50292        CORRECT_MSVCR_ARCH=386
50293      else
50294        CORRECT_MSVCR_ARCH=x86-64
50295      fi
50296    fi
50297    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50298      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50299$as_echo "ok" >&6; }
50300      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50301
50302  # Only process if variable expands to non-empty
50303
50304  if test "x$MSVC_DLL" != x; then
50305    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50306
50307  # Input might be given as Windows format, start by converting to
50308  # unix format.
50309  path="$MSVC_DLL"
50310  new_path=`$CYGPATH -u "$path"`
50311
50312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50315  # "foo.exe" is OK but "foo" is an error.
50316  #
50317  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50318  # It is also a way to make sure we got the proper file name for the real test later on.
50319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50320  if test "x$test_shortpath" = x; then
50321    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50322$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50323    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50324  fi
50325
50326  # Call helper function which possibly converts this using DOS-style short mode.
50327  # If so, the updated path is stored in $new_path.
50328
50329  input_path="$new_path"
50330  # Check if we need to convert this using DOS-style short mode. If the path
50331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50332  # take no chances and rewrite it.
50333  # Note: m4 eats our [], so we need to use [ and ] instead.
50334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50335  if test "x$has_forbidden_chars" != x; then
50336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50340      # Going to short mode and back again did indeed matter. Since short mode is
50341      # case insensitive, let's make it lowercase to improve readability.
50342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50343      # Now convert it back to Unix-style (cygpath)
50344      input_path=`$CYGPATH -u "$shortmode_path"`
50345      new_path="$input_path"
50346    fi
50347  fi
50348
50349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50350  if test "x$test_cygdrive_prefix" = x; then
50351    # As a simple fix, exclude /usr/bin since it's not a real path.
50352    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50354      # a path prefixed by /cygdrive for fixpath to work.
50355      new_path="$CYGWIN_ROOT_PATH$input_path"
50356    fi
50357  fi
50358
50359
50360  if test "x$path" != "x$new_path"; then
50361    MSVC_DLL="$new_path"
50362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50363$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50364  fi
50365
50366    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50367
50368  path="$MSVC_DLL"
50369  has_colon=`$ECHO $path | $GREP ^.:`
50370  new_path="$path"
50371  if test "x$has_colon" = x; then
50372    # Not in mixed or Windows style, start by that.
50373    new_path=`cmd //c echo $path`
50374  fi
50375
50376
50377  input_path="$new_path"
50378  # Check if we need to convert this using DOS-style short mode. If the path
50379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50380  # take no chances and rewrite it.
50381  # Note: m4 eats our [], so we need to use [ and ] instead.
50382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50383  if test "x$has_forbidden_chars" != x; then
50384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50386  fi
50387
50388
50389  windows_path="$new_path"
50390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50391    unix_path=`$CYGPATH -u "$windows_path"`
50392    new_path="$unix_path"
50393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50395    new_path="$unix_path"
50396  fi
50397
50398  if test "x$path" != "x$new_path"; then
50399    MSVC_DLL="$new_path"
50400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50401$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50402  fi
50403
50404  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50405  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50406
50407    else
50408      # We're on a unix platform. Hooray! :)
50409      path="$MSVC_DLL"
50410      has_space=`$ECHO "$path" | $GREP " "`
50411      if test "x$has_space" != x; then
50412        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50413$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50414        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50415      fi
50416
50417      # Use eval to expand a potential ~
50418      eval path="$path"
50419      if test ! -f "$path" && test ! -d "$path"; then
50420        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50421      fi
50422
50423      if test -d "$path"; then
50424        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50425      else
50426        dir="`$DIRNAME "$path"`"
50427        base="`$BASENAME "$path"`"
50428        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50429      fi
50430    fi
50431  fi
50432
50433      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50434$as_echo_n "checking for $DLL_NAME... " >&6; }
50435      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50436$as_echo "$MSVC_DLL" >&6; }
50437    else
50438      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50439$as_echo "incorrect, ignoring" >&6; }
50440      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50441$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50442    fi
50443  fi
50444
50445  fi
50446
50447  if test "x$MSVC_DLL" = x; then
50448    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50449    if test "x$VS100COMNTOOLS" != x; then
50450      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50451
50452  windows_path="$CYGWIN_VS_TOOLS_DIR"
50453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50454    unix_path=`$CYGPATH -u "$windows_path"`
50455    CYGWIN_VS_TOOLS_DIR="$unix_path"
50456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50458    CYGWIN_VS_TOOLS_DIR="$unix_path"
50459  fi
50460
50461      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50462        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50463	    | $GREP -i /x64/ | $HEAD --lines 1`
50464      else
50465        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50466	    | $GREP -i /x86/ | $HEAD --lines 1`
50467      fi
50468
50469  DLL_NAME="$DLL_NAME"
50470  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50471  METHOD="search of VS100COMNTOOLS"
50472  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50473    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50474$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50475
50476    # Need to check if the found msvcr is correct architecture
50477    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50478$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50479    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50480    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50481      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50482      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50483      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50484        CORRECT_MSVCR_ARCH="PE32 executable"
50485      else
50486        CORRECT_MSVCR_ARCH="PE32+ executable"
50487      fi
50488    else
50489      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50490        CORRECT_MSVCR_ARCH=386
50491      else
50492        CORRECT_MSVCR_ARCH=x86-64
50493      fi
50494    fi
50495    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50496      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50497$as_echo "ok" >&6; }
50498      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50499
50500  # Only process if variable expands to non-empty
50501
50502  if test "x$MSVC_DLL" != x; then
50503    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50504
50505  # Input might be given as Windows format, start by converting to
50506  # unix format.
50507  path="$MSVC_DLL"
50508  new_path=`$CYGPATH -u "$path"`
50509
50510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50513  # "foo.exe" is OK but "foo" is an error.
50514  #
50515  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50516  # It is also a way to make sure we got the proper file name for the real test later on.
50517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50518  if test "x$test_shortpath" = x; then
50519    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50520$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50521    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50522  fi
50523
50524  # Call helper function which possibly converts this using DOS-style short mode.
50525  # If so, the updated path is stored in $new_path.
50526
50527  input_path="$new_path"
50528  # Check if we need to convert this using DOS-style short mode. If the path
50529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50530  # take no chances and rewrite it.
50531  # Note: m4 eats our [], so we need to use [ and ] instead.
50532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50533  if test "x$has_forbidden_chars" != x; then
50534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50535    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50536    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50537    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50538      # Going to short mode and back again did indeed matter. Since short mode is
50539      # case insensitive, let's make it lowercase to improve readability.
50540      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50541      # Now convert it back to Unix-style (cygpath)
50542      input_path=`$CYGPATH -u "$shortmode_path"`
50543      new_path="$input_path"
50544    fi
50545  fi
50546
50547  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50548  if test "x$test_cygdrive_prefix" = x; then
50549    # As a simple fix, exclude /usr/bin since it's not a real path.
50550    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50551      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50552      # a path prefixed by /cygdrive for fixpath to work.
50553      new_path="$CYGWIN_ROOT_PATH$input_path"
50554    fi
50555  fi
50556
50557
50558  if test "x$path" != "x$new_path"; then
50559    MSVC_DLL="$new_path"
50560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50561$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50562  fi
50563
50564    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50565
50566  path="$MSVC_DLL"
50567  has_colon=`$ECHO $path | $GREP ^.:`
50568  new_path="$path"
50569  if test "x$has_colon" = x; then
50570    # Not in mixed or Windows style, start by that.
50571    new_path=`cmd //c echo $path`
50572  fi
50573
50574
50575  input_path="$new_path"
50576  # Check if we need to convert this using DOS-style short mode. If the path
50577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50578  # take no chances and rewrite it.
50579  # Note: m4 eats our [], so we need to use [ and ] instead.
50580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50581  if test "x$has_forbidden_chars" != x; then
50582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50584  fi
50585
50586
50587  windows_path="$new_path"
50588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50589    unix_path=`$CYGPATH -u "$windows_path"`
50590    new_path="$unix_path"
50591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50593    new_path="$unix_path"
50594  fi
50595
50596  if test "x$path" != "x$new_path"; then
50597    MSVC_DLL="$new_path"
50598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50599$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50600  fi
50601
50602  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50603  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50604
50605    else
50606      # We're on a unix platform. Hooray! :)
50607      path="$MSVC_DLL"
50608      has_space=`$ECHO "$path" | $GREP " "`
50609      if test "x$has_space" != x; then
50610        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50611$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50612        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50613      fi
50614
50615      # Use eval to expand a potential ~
50616      eval path="$path"
50617      if test ! -f "$path" && test ! -d "$path"; then
50618        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50619      fi
50620
50621      if test -d "$path"; then
50622        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50623      else
50624        dir="`$DIRNAME "$path"`"
50625        base="`$BASENAME "$path"`"
50626        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50627      fi
50628    fi
50629  fi
50630
50631      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50632$as_echo_n "checking for $DLL_NAME... " >&6; }
50633      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50634$as_echo "$MSVC_DLL" >&6; }
50635    else
50636      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50637$as_echo "incorrect, ignoring" >&6; }
50638      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50639$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50640    fi
50641  fi
50642
50643    fi
50644  fi
50645
50646  if test "x$MSVC_DLL" = x; then
50647    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50648    # (This was the original behaviour; kept since it might turn something up)
50649    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50650      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50651        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50652	    | $GREP x64 | $HEAD --lines 1`
50653      else
50654        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50655	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50656        if test "x$POSSIBLE_MSVC_DLL" = x; then
50657          # We're grasping at straws now...
50658          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50659	      | $HEAD --lines 1`
50660        fi
50661      fi
50662
50663
50664  DLL_NAME="$DLL_NAME"
50665  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50666  METHOD="search of VCINSTALLDIR"
50667  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50668    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50669$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50670
50671    # Need to check if the found msvcr is correct architecture
50672    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50673$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50674    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50675    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50676      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50677      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50678      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50679        CORRECT_MSVCR_ARCH="PE32 executable"
50680      else
50681        CORRECT_MSVCR_ARCH="PE32+ executable"
50682      fi
50683    else
50684      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50685        CORRECT_MSVCR_ARCH=386
50686      else
50687        CORRECT_MSVCR_ARCH=x86-64
50688      fi
50689    fi
50690    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50691      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50692$as_echo "ok" >&6; }
50693      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50694
50695  # Only process if variable expands to non-empty
50696
50697  if test "x$MSVC_DLL" != x; then
50698    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50699
50700  # Input might be given as Windows format, start by converting to
50701  # unix format.
50702  path="$MSVC_DLL"
50703  new_path=`$CYGPATH -u "$path"`
50704
50705  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50706  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50707  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50708  # "foo.exe" is OK but "foo" is an error.
50709  #
50710  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50711  # It is also a way to make sure we got the proper file name for the real test later on.
50712  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50713  if test "x$test_shortpath" = x; then
50714    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50715$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50716    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50717  fi
50718
50719  # Call helper function which possibly converts this using DOS-style short mode.
50720  # If so, the updated path is stored in $new_path.
50721
50722  input_path="$new_path"
50723  # Check if we need to convert this using DOS-style short mode. If the path
50724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50725  # take no chances and rewrite it.
50726  # Note: m4 eats our [], so we need to use [ and ] instead.
50727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50728  if test "x$has_forbidden_chars" != x; then
50729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50730    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50731    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50732    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50733      # Going to short mode and back again did indeed matter. Since short mode is
50734      # case insensitive, let's make it lowercase to improve readability.
50735      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50736      # Now convert it back to Unix-style (cygpath)
50737      input_path=`$CYGPATH -u "$shortmode_path"`
50738      new_path="$input_path"
50739    fi
50740  fi
50741
50742  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50743  if test "x$test_cygdrive_prefix" = x; then
50744    # As a simple fix, exclude /usr/bin since it's not a real path.
50745    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50746      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50747      # a path prefixed by /cygdrive for fixpath to work.
50748      new_path="$CYGWIN_ROOT_PATH$input_path"
50749    fi
50750  fi
50751
50752
50753  if test "x$path" != "x$new_path"; then
50754    MSVC_DLL="$new_path"
50755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50756$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50757  fi
50758
50759    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50760
50761  path="$MSVC_DLL"
50762  has_colon=`$ECHO $path | $GREP ^.:`
50763  new_path="$path"
50764  if test "x$has_colon" = x; then
50765    # Not in mixed or Windows style, start by that.
50766    new_path=`cmd //c echo $path`
50767  fi
50768
50769
50770  input_path="$new_path"
50771  # Check if we need to convert this using DOS-style short mode. If the path
50772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50773  # take no chances and rewrite it.
50774  # Note: m4 eats our [], so we need to use [ and ] instead.
50775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50776  if test "x$has_forbidden_chars" != x; then
50777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50778    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50779  fi
50780
50781
50782  windows_path="$new_path"
50783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50784    unix_path=`$CYGPATH -u "$windows_path"`
50785    new_path="$unix_path"
50786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50788    new_path="$unix_path"
50789  fi
50790
50791  if test "x$path" != "x$new_path"; then
50792    MSVC_DLL="$new_path"
50793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50794$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50795  fi
50796
50797  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50798  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50799
50800    else
50801      # We're on a unix platform. Hooray! :)
50802      path="$MSVC_DLL"
50803      has_space=`$ECHO "$path" | $GREP " "`
50804      if test "x$has_space" != x; then
50805        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50806$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50807        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50808      fi
50809
50810      # Use eval to expand a potential ~
50811      eval path="$path"
50812      if test ! -f "$path" && test ! -d "$path"; then
50813        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50814      fi
50815
50816      if test -d "$path"; then
50817        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50818      else
50819        dir="`$DIRNAME "$path"`"
50820        base="`$BASENAME "$path"`"
50821        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50822      fi
50823    fi
50824  fi
50825
50826      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50827$as_echo_n "checking for $DLL_NAME... " >&6; }
50828      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50829$as_echo "$MSVC_DLL" >&6; }
50830    else
50831      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50832$as_echo "incorrect, ignoring" >&6; }
50833      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50834$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50835    fi
50836  fi
50837
50838    fi
50839  fi
50840
50841  if test "x$MSVC_DLL" = x; then
50842    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50843$as_echo_n "checking for $DLL_NAME... " >&6; }
50844    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50845$as_echo "no" >&6; }
50846    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50847  fi
50848
50849      MSVCP_DLL="$MSVC_DLL"
50850    fi
50851
50852  fi
50853
50854  fi
50855
50856
50857  if test "x$NEEDS_LIB_X11" = xfalse; then
50858    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
50859      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
50860$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
50861    fi
50862    X_CFLAGS=
50863    X_LIBS=
50864  else
50865
50866    if test "x${with_x}" = xno; then
50867      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
50868    fi
50869
50870    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
50871      # The user has specified a X11 base directory. Use it for includes and
50872      # libraries, unless explicitely overridden.
50873      if test "x$x_includes" = xNONE; then
50874        x_includes="${with_x}/include"
50875      fi
50876      if test "x$x_libraries" = xNONE; then
50877        x_libraries="${with_x}/lib"
50878      fi
50879    else
50880      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
50881      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
50882      # --x-libraries for the sysroot, if that seems to be correct.
50883      if test "x$SYSROOT" != "x"; then
50884        if test "x$x_includes" = xNONE; then
50885          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
50886            x_includes="$SYSROOT/usr/X11R6/include"
50887          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
50888            x_includes="$SYSROOT/usr/include"
50889          fi
50890        fi
50891        if test "x$x_libraries" = xNONE; then
50892          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
50893            x_libraries="$SYSROOT/usr/X11R6/lib"
50894          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50895            x_libraries="$SYSROOT/usr/lib64"
50896          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
50897            x_libraries="$SYSROOT/usr/lib"
50898          fi
50899        fi
50900      fi
50901    fi
50902
50903    # Now let autoconf do it's magic
50904    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
50905$as_echo_n "checking for X... " >&6; }
50906
50907
50908# Check whether --with-x was given.
50909if test "${with_x+set}" = set; then :
50910  withval=$with_x;
50911fi
50912
50913# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
50914if test "x$with_x" = xno; then
50915  # The user explicitly disabled X.
50916  have_x=disabled
50917else
50918  case $x_includes,$x_libraries in #(
50919    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
50920    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
50921  $as_echo_n "(cached) " >&6
50922else
50923  # One or both of the vars are not set, and there is no cached value.
50924ac_x_includes=no ac_x_libraries=no
50925rm -f -r conftest.dir
50926if mkdir conftest.dir; then
50927  cd conftest.dir
50928  cat >Imakefile <<'_ACEOF'
50929incroot:
50930	@echo incroot='${INCROOT}'
50931usrlibdir:
50932	@echo usrlibdir='${USRLIBDIR}'
50933libdir:
50934	@echo libdir='${LIBDIR}'
50935_ACEOF
50936  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
50937    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
50938    for ac_var in incroot usrlibdir libdir; do
50939      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
50940    done
50941    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
50942    for ac_extension in a so sl dylib la dll; do
50943      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
50944	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
50945	ac_im_usrlibdir=$ac_im_libdir; break
50946      fi
50947    done
50948    # Screen out bogus values from the imake configuration.  They are
50949    # bogus both because they are the default anyway, and because
50950    # using them would break gcc on systems where it needs fixed includes.
50951    case $ac_im_incroot in
50952	/usr/include) ac_x_includes= ;;
50953	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
50954    esac
50955    case $ac_im_usrlibdir in
50956	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
50957	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
50958    esac
50959  fi
50960  cd ..
50961  rm -f -r conftest.dir
50962fi
50963
50964# Standard set of common directories for X headers.
50965# Check X11 before X11Rn because it is often a symlink to the current release.
50966ac_x_header_dirs='
50967/usr/X11/include
50968/usr/X11R7/include
50969/usr/X11R6/include
50970/usr/X11R5/include
50971/usr/X11R4/include
50972
50973/usr/include/X11
50974/usr/include/X11R7
50975/usr/include/X11R6
50976/usr/include/X11R5
50977/usr/include/X11R4
50978
50979/usr/local/X11/include
50980/usr/local/X11R7/include
50981/usr/local/X11R6/include
50982/usr/local/X11R5/include
50983/usr/local/X11R4/include
50984
50985/usr/local/include/X11
50986/usr/local/include/X11R7
50987/usr/local/include/X11R6
50988/usr/local/include/X11R5
50989/usr/local/include/X11R4
50990
50991/usr/X386/include
50992/usr/x386/include
50993/usr/XFree86/include/X11
50994
50995/usr/include
50996/usr/local/include
50997/usr/unsupported/include
50998/usr/athena/include
50999/usr/local/x11r5/include
51000/usr/lpp/Xamples/include
51001
51002/usr/openwin/include
51003/usr/openwin/share/include'
51004
51005if test "$ac_x_includes" = no; then
51006  # Guess where to find include files, by looking for Xlib.h.
51007  # First, try using that file with no special directory specified.
51008  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51009/* end confdefs.h.  */
51010#include <X11/Xlib.h>
51011_ACEOF
51012if ac_fn_cxx_try_cpp "$LINENO"; then :
51013  # We can compile using X headers with no special include directory.
51014ac_x_includes=
51015else
51016  for ac_dir in $ac_x_header_dirs; do
51017  if test -r "$ac_dir/X11/Xlib.h"; then
51018    ac_x_includes=$ac_dir
51019    break
51020  fi
51021done
51022fi
51023rm -f conftest.err conftest.i conftest.$ac_ext
51024fi # $ac_x_includes = no
51025
51026if test "$ac_x_libraries" = no; then
51027  # Check for the libraries.
51028  # See if we find them without any special options.
51029  # Don't add to $LIBS permanently.
51030  ac_save_LIBS=$LIBS
51031  LIBS="-lX11 $LIBS"
51032  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51033/* end confdefs.h.  */
51034#include <X11/Xlib.h>
51035int
51036main ()
51037{
51038XrmInitialize ()
51039  ;
51040  return 0;
51041}
51042_ACEOF
51043if ac_fn_cxx_try_link "$LINENO"; then :
51044  LIBS=$ac_save_LIBS
51045# We can link X programs with no special library path.
51046ac_x_libraries=
51047else
51048  LIBS=$ac_save_LIBS
51049for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
51050do
51051  # Don't even attempt the hair of trying to link an X program!
51052  for ac_extension in a so sl dylib la dll; do
51053    if test -r "$ac_dir/libX11.$ac_extension"; then
51054      ac_x_libraries=$ac_dir
51055      break 2
51056    fi
51057  done
51058done
51059fi
51060rm -f core conftest.err conftest.$ac_objext \
51061    conftest$ac_exeext conftest.$ac_ext
51062fi # $ac_x_libraries = no
51063
51064case $ac_x_includes,$ac_x_libraries in #(
51065  no,* | *,no | *\'*)
51066    # Didn't find X, or a directory has "'" in its name.
51067    ac_cv_have_x="have_x=no";; #(
51068  *)
51069    # Record where we found X for the cache.
51070    ac_cv_have_x="have_x=yes\
51071	ac_x_includes='$ac_x_includes'\
51072	ac_x_libraries='$ac_x_libraries'"
51073esac
51074fi
51075;; #(
51076    *) have_x=yes;;
51077  esac
51078  eval "$ac_cv_have_x"
51079fi # $with_x != no
51080
51081if test "$have_x" != yes; then
51082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
51083$as_echo "$have_x" >&6; }
51084  no_x=yes
51085else
51086  # If each of the values was on the command line, it overrides each guess.
51087  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
51088  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
51089  # Update the cache value to reflect the command line values.
51090  ac_cv_have_x="have_x=yes\
51091	ac_x_includes='$x_includes'\
51092	ac_x_libraries='$x_libraries'"
51093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
51094$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
51095fi
51096
51097    if test "$no_x" = yes; then
51098  # Not all programs may use this symbol, but it does not hurt to define it.
51099
51100$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
51101
51102  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
51103else
51104  if test -n "$x_includes"; then
51105    X_CFLAGS="$X_CFLAGS -I$x_includes"
51106  fi
51107
51108  # It would also be nice to do this for all -L options, not just this one.
51109  if test -n "$x_libraries"; then
51110    X_LIBS="$X_LIBS -L$x_libraries"
51111    # For Solaris; some versions of Sun CC require a space after -R and
51112    # others require no space.  Words are not sufficient . . . .
51113    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
51114$as_echo_n "checking whether -R must be followed by a space... " >&6; }
51115    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
51116    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
51117    ac_cxx_werror_flag=yes
51118    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51119/* end confdefs.h.  */
51120
51121int
51122main ()
51123{
51124
51125  ;
51126  return 0;
51127}
51128_ACEOF
51129if ac_fn_cxx_try_link "$LINENO"; then :
51130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51131$as_echo "no" >&6; }
51132       X_LIBS="$X_LIBS -R$x_libraries"
51133else
51134  LIBS="$ac_xsave_LIBS -R $x_libraries"
51135       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51136/* end confdefs.h.  */
51137
51138int
51139main ()
51140{
51141
51142  ;
51143  return 0;
51144}
51145_ACEOF
51146if ac_fn_cxx_try_link "$LINENO"; then :
51147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51148$as_echo "yes" >&6; }
51149	  X_LIBS="$X_LIBS -R $x_libraries"
51150else
51151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
51152$as_echo "neither works" >&6; }
51153fi
51154rm -f core conftest.err conftest.$ac_objext \
51155    conftest$ac_exeext conftest.$ac_ext
51156fi
51157rm -f core conftest.err conftest.$ac_objext \
51158    conftest$ac_exeext conftest.$ac_ext
51159    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
51160    LIBS=$ac_xsave_LIBS
51161  fi
51162
51163  # Check for system-dependent libraries X programs must link with.
51164  # Do this before checking for the system-independent R6 libraries
51165  # (-lICE), since we may need -lsocket or whatever for X linking.
51166
51167  if test "$ISC" = yes; then
51168    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
51169  else
51170    # Martyn Johnson says this is needed for Ultrix, if the X
51171    # libraries were built with DECnet support.  And Karl Berry says
51172    # the Alpha needs dnet_stub (dnet does not exist).
51173    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
51174    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51175/* end confdefs.h.  */
51176
51177/* Override any GCC internal prototype to avoid an error.
51178   Use char because int might match the return type of a GCC
51179   builtin and then its argument prototype would still apply.  */
51180#ifdef __cplusplus
51181extern "C"
51182#endif
51183char XOpenDisplay ();
51184int
51185main ()
51186{
51187return XOpenDisplay ();
51188  ;
51189  return 0;
51190}
51191_ACEOF
51192if ac_fn_cxx_try_link "$LINENO"; then :
51193
51194else
51195  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
51196$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
51197if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
51198  $as_echo_n "(cached) " >&6
51199else
51200  ac_check_lib_save_LIBS=$LIBS
51201LIBS="-ldnet  $LIBS"
51202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51203/* end confdefs.h.  */
51204
51205/* Override any GCC internal prototype to avoid an error.
51206   Use char because int might match the return type of a GCC
51207   builtin and then its argument prototype would still apply.  */
51208#ifdef __cplusplus
51209extern "C"
51210#endif
51211char dnet_ntoa ();
51212int
51213main ()
51214{
51215return dnet_ntoa ();
51216  ;
51217  return 0;
51218}
51219_ACEOF
51220if ac_fn_cxx_try_link "$LINENO"; then :
51221  ac_cv_lib_dnet_dnet_ntoa=yes
51222else
51223  ac_cv_lib_dnet_dnet_ntoa=no
51224fi
51225rm -f core conftest.err conftest.$ac_objext \
51226    conftest$ac_exeext conftest.$ac_ext
51227LIBS=$ac_check_lib_save_LIBS
51228fi
51229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
51230$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
51231if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
51232  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
51233fi
51234
51235    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
51236      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
51237$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
51238if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
51239  $as_echo_n "(cached) " >&6
51240else
51241  ac_check_lib_save_LIBS=$LIBS
51242LIBS="-ldnet_stub  $LIBS"
51243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51244/* end confdefs.h.  */
51245
51246/* Override any GCC internal prototype to avoid an error.
51247   Use char because int might match the return type of a GCC
51248   builtin and then its argument prototype would still apply.  */
51249#ifdef __cplusplus
51250extern "C"
51251#endif
51252char dnet_ntoa ();
51253int
51254main ()
51255{
51256return dnet_ntoa ();
51257  ;
51258  return 0;
51259}
51260_ACEOF
51261if ac_fn_cxx_try_link "$LINENO"; then :
51262  ac_cv_lib_dnet_stub_dnet_ntoa=yes
51263else
51264  ac_cv_lib_dnet_stub_dnet_ntoa=no
51265fi
51266rm -f core conftest.err conftest.$ac_objext \
51267    conftest$ac_exeext conftest.$ac_ext
51268LIBS=$ac_check_lib_save_LIBS
51269fi
51270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
51271$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
51272if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
51273  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
51274fi
51275
51276    fi
51277fi
51278rm -f core conftest.err conftest.$ac_objext \
51279    conftest$ac_exeext conftest.$ac_ext
51280    LIBS="$ac_xsave_LIBS"
51281
51282    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
51283    # to get the SysV transport functions.
51284    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
51285    # needs -lnsl.
51286    # The nsl library prevents programs from opening the X display
51287    # on Irix 5.2, according to T.E. Dickey.
51288    # The functions gethostbyname, getservbyname, and inet_addr are
51289    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
51290    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
51291if test "x$ac_cv_func_gethostbyname" = xyes; then :
51292
51293fi
51294
51295    if test $ac_cv_func_gethostbyname = no; then
51296      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
51297$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
51298if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
51299  $as_echo_n "(cached) " >&6
51300else
51301  ac_check_lib_save_LIBS=$LIBS
51302LIBS="-lnsl  $LIBS"
51303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51304/* end confdefs.h.  */
51305
51306/* Override any GCC internal prototype to avoid an error.
51307   Use char because int might match the return type of a GCC
51308   builtin and then its argument prototype would still apply.  */
51309#ifdef __cplusplus
51310extern "C"
51311#endif
51312char gethostbyname ();
51313int
51314main ()
51315{
51316return gethostbyname ();
51317  ;
51318  return 0;
51319}
51320_ACEOF
51321if ac_fn_cxx_try_link "$LINENO"; then :
51322  ac_cv_lib_nsl_gethostbyname=yes
51323else
51324  ac_cv_lib_nsl_gethostbyname=no
51325fi
51326rm -f core conftest.err conftest.$ac_objext \
51327    conftest$ac_exeext conftest.$ac_ext
51328LIBS=$ac_check_lib_save_LIBS
51329fi
51330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
51331$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
51332if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
51333  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
51334fi
51335
51336      if test $ac_cv_lib_nsl_gethostbyname = no; then
51337	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
51338$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
51339if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
51340  $as_echo_n "(cached) " >&6
51341else
51342  ac_check_lib_save_LIBS=$LIBS
51343LIBS="-lbsd  $LIBS"
51344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51345/* end confdefs.h.  */
51346
51347/* Override any GCC internal prototype to avoid an error.
51348   Use char because int might match the return type of a GCC
51349   builtin and then its argument prototype would still apply.  */
51350#ifdef __cplusplus
51351extern "C"
51352#endif
51353char gethostbyname ();
51354int
51355main ()
51356{
51357return gethostbyname ();
51358  ;
51359  return 0;
51360}
51361_ACEOF
51362if ac_fn_cxx_try_link "$LINENO"; then :
51363  ac_cv_lib_bsd_gethostbyname=yes
51364else
51365  ac_cv_lib_bsd_gethostbyname=no
51366fi
51367rm -f core conftest.err conftest.$ac_objext \
51368    conftest$ac_exeext conftest.$ac_ext
51369LIBS=$ac_check_lib_save_LIBS
51370fi
51371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
51372$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
51373if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
51374  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
51375fi
51376
51377      fi
51378    fi
51379
51380    # lieder@skyler.mavd.honeywell.com says without -lsocket,
51381    # socket/setsockopt and other routines are undefined under SCO ODT
51382    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
51383    # on later versions), says Simon Leinen: it contains gethostby*
51384    # variants that don't use the name server (or something).  -lsocket
51385    # must be given before -lnsl if both are needed.  We assume that
51386    # if connect needs -lnsl, so does gethostbyname.
51387    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
51388if test "x$ac_cv_func_connect" = xyes; then :
51389
51390fi
51391
51392    if test $ac_cv_func_connect = no; then
51393      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
51394$as_echo_n "checking for connect in -lsocket... " >&6; }
51395if ${ac_cv_lib_socket_connect+:} false; then :
51396  $as_echo_n "(cached) " >&6
51397else
51398  ac_check_lib_save_LIBS=$LIBS
51399LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
51400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51401/* end confdefs.h.  */
51402
51403/* Override any GCC internal prototype to avoid an error.
51404   Use char because int might match the return type of a GCC
51405   builtin and then its argument prototype would still apply.  */
51406#ifdef __cplusplus
51407extern "C"
51408#endif
51409char connect ();
51410int
51411main ()
51412{
51413return connect ();
51414  ;
51415  return 0;
51416}
51417_ACEOF
51418if ac_fn_cxx_try_link "$LINENO"; then :
51419  ac_cv_lib_socket_connect=yes
51420else
51421  ac_cv_lib_socket_connect=no
51422fi
51423rm -f core conftest.err conftest.$ac_objext \
51424    conftest$ac_exeext conftest.$ac_ext
51425LIBS=$ac_check_lib_save_LIBS
51426fi
51427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
51428$as_echo "$ac_cv_lib_socket_connect" >&6; }
51429if test "x$ac_cv_lib_socket_connect" = xyes; then :
51430  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
51431fi
51432
51433    fi
51434
51435    # Guillermo Gomez says -lposix is necessary on A/UX.
51436    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
51437if test "x$ac_cv_func_remove" = xyes; then :
51438
51439fi
51440
51441    if test $ac_cv_func_remove = no; then
51442      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
51443$as_echo_n "checking for remove in -lposix... " >&6; }
51444if ${ac_cv_lib_posix_remove+:} false; then :
51445  $as_echo_n "(cached) " >&6
51446else
51447  ac_check_lib_save_LIBS=$LIBS
51448LIBS="-lposix  $LIBS"
51449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51450/* end confdefs.h.  */
51451
51452/* Override any GCC internal prototype to avoid an error.
51453   Use char because int might match the return type of a GCC
51454   builtin and then its argument prototype would still apply.  */
51455#ifdef __cplusplus
51456extern "C"
51457#endif
51458char remove ();
51459int
51460main ()
51461{
51462return remove ();
51463  ;
51464  return 0;
51465}
51466_ACEOF
51467if ac_fn_cxx_try_link "$LINENO"; then :
51468  ac_cv_lib_posix_remove=yes
51469else
51470  ac_cv_lib_posix_remove=no
51471fi
51472rm -f core conftest.err conftest.$ac_objext \
51473    conftest$ac_exeext conftest.$ac_ext
51474LIBS=$ac_check_lib_save_LIBS
51475fi
51476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
51477$as_echo "$ac_cv_lib_posix_remove" >&6; }
51478if test "x$ac_cv_lib_posix_remove" = xyes; then :
51479  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
51480fi
51481
51482    fi
51483
51484    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
51485    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
51486if test "x$ac_cv_func_shmat" = xyes; then :
51487
51488fi
51489
51490    if test $ac_cv_func_shmat = no; then
51491      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
51492$as_echo_n "checking for shmat in -lipc... " >&6; }
51493if ${ac_cv_lib_ipc_shmat+:} false; then :
51494  $as_echo_n "(cached) " >&6
51495else
51496  ac_check_lib_save_LIBS=$LIBS
51497LIBS="-lipc  $LIBS"
51498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51499/* end confdefs.h.  */
51500
51501/* Override any GCC internal prototype to avoid an error.
51502   Use char because int might match the return type of a GCC
51503   builtin and then its argument prototype would still apply.  */
51504#ifdef __cplusplus
51505extern "C"
51506#endif
51507char shmat ();
51508int
51509main ()
51510{
51511return shmat ();
51512  ;
51513  return 0;
51514}
51515_ACEOF
51516if ac_fn_cxx_try_link "$LINENO"; then :
51517  ac_cv_lib_ipc_shmat=yes
51518else
51519  ac_cv_lib_ipc_shmat=no
51520fi
51521rm -f core conftest.err conftest.$ac_objext \
51522    conftest$ac_exeext conftest.$ac_ext
51523LIBS=$ac_check_lib_save_LIBS
51524fi
51525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
51526$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
51527if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
51528  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
51529fi
51530
51531    fi
51532  fi
51533
51534  # Check for libraries that X11R6 Xt/Xaw programs need.
51535  ac_save_LDFLAGS=$LDFLAGS
51536  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
51537  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
51538  # check for ICE first), but we must link in the order -lSM -lICE or
51539  # we get undefined symbols.  So assume we have SM if we have ICE.
51540  # These have to be linked with before -lX11, unlike the other
51541  # libraries we check for below, so use a different variable.
51542  # John Interrante, Karl Berry
51543  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
51544$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
51545if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
51546  $as_echo_n "(cached) " >&6
51547else
51548  ac_check_lib_save_LIBS=$LIBS
51549LIBS="-lICE $X_EXTRA_LIBS $LIBS"
51550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51551/* end confdefs.h.  */
51552
51553/* Override any GCC internal prototype to avoid an error.
51554   Use char because int might match the return type of a GCC
51555   builtin and then its argument prototype would still apply.  */
51556#ifdef __cplusplus
51557extern "C"
51558#endif
51559char IceConnectionNumber ();
51560int
51561main ()
51562{
51563return IceConnectionNumber ();
51564  ;
51565  return 0;
51566}
51567_ACEOF
51568if ac_fn_cxx_try_link "$LINENO"; then :
51569  ac_cv_lib_ICE_IceConnectionNumber=yes
51570else
51571  ac_cv_lib_ICE_IceConnectionNumber=no
51572fi
51573rm -f core conftest.err conftest.$ac_objext \
51574    conftest$ac_exeext conftest.$ac_ext
51575LIBS=$ac_check_lib_save_LIBS
51576fi
51577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
51578$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
51579if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
51580  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
51581fi
51582
51583  LDFLAGS=$ac_save_LDFLAGS
51584
51585fi
51586
51587
51588    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
51589    # this doesn't make sense so we remove it.
51590    if test "x$COMPILE_TYPE" = xcross; then
51591      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
51592    fi
51593
51594    if test "x$no_x" = xyes; then
51595
51596  # Print a helpful message on how to acquire the necessary build dependency.
51597  # x11 is the help tag: freetype, cups, alsa etc
51598  MISSING_DEPENDENCY=x11
51599
51600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51601    cygwin_help $MISSING_DEPENDENCY
51602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51603    msys_help $MISSING_DEPENDENCY
51604  else
51605    PKGHANDLER_COMMAND=
51606
51607    case $PKGHANDLER in
51608      apt-get)
51609        apt_help     $MISSING_DEPENDENCY ;;
51610      yum)
51611        yum_help     $MISSING_DEPENDENCY ;;
51612      port)
51613        port_help    $MISSING_DEPENDENCY ;;
51614      pkgutil)
51615        pkgutil_help $MISSING_DEPENDENCY ;;
51616      pkgadd)
51617        pkgadd_help  $MISSING_DEPENDENCY ;;
51618    esac
51619
51620    if test "x$PKGHANDLER_COMMAND" != x; then
51621      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51622    fi
51623  fi
51624
51625      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
51626    fi
51627
51628    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51629      OPENWIN_HOME="/usr/openwin"
51630      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
51631      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51632          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
51633          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51634          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
51635    fi
51636
51637    ac_ext=c
51638ac_cpp='$CPP $CPPFLAGS'
51639ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51640ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51641ac_compiler_gnu=$ac_cv_c_compiler_gnu
51642
51643    OLD_CFLAGS="$CFLAGS"
51644    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
51645
51646    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
51647    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
51648do :
51649  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51650ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
51651          # include <X11/Xlib.h>
51652          # include <X11/Xutil.h>
51653
51654
51655"
51656if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51657  cat >>confdefs.h <<_ACEOF
51658#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51659_ACEOF
51660 X11_HEADERS_OK=yes
51661else
51662  X11_HEADERS_OK=no; break
51663fi
51664
51665done
51666
51667
51668    if test "x$X11_HEADERS_OK" = xno; then
51669
51670  # Print a helpful message on how to acquire the necessary build dependency.
51671  # x11 is the help tag: freetype, cups, alsa etc
51672  MISSING_DEPENDENCY=x11
51673
51674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51675    cygwin_help $MISSING_DEPENDENCY
51676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51677    msys_help $MISSING_DEPENDENCY
51678  else
51679    PKGHANDLER_COMMAND=
51680
51681    case $PKGHANDLER in
51682      apt-get)
51683        apt_help     $MISSING_DEPENDENCY ;;
51684      yum)
51685        yum_help     $MISSING_DEPENDENCY ;;
51686      port)
51687        port_help    $MISSING_DEPENDENCY ;;
51688      pkgutil)
51689        pkgutil_help $MISSING_DEPENDENCY ;;
51690      pkgadd)
51691        pkgadd_help  $MISSING_DEPENDENCY ;;
51692    esac
51693
51694    if test "x$PKGHANDLER_COMMAND" != x; then
51695      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51696    fi
51697  fi
51698
51699      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
51700    fi
51701
51702    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
51703    # defined in libawt_xawt.
51704    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
51705$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
51706    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51707/* end confdefs.h.  */
51708#include <X11/extensions/Xrender.h>
51709int
51710main ()
51711{
51712XLinearGradient x;
51713  ;
51714  return 0;
51715}
51716_ACEOF
51717if ac_fn_c_try_compile "$LINENO"; then :
51718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51719$as_echo "yes" >&6; }
51720else
51721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51722$as_echo "no" >&6; }
51723         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
51724fi
51725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51726
51727    CFLAGS="$OLD_CFLAGS"
51728    ac_ext=cpp
51729ac_cpp='$CXXCPP $CPPFLAGS'
51730ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51731ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51732ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51733
51734  fi # NEEDS_LIB_X11
51735
51736
51737
51738
51739
51740
51741# Check whether --with-cups was given.
51742if test "${with_cups+set}" = set; then :
51743  withval=$with_cups;
51744fi
51745
51746
51747# Check whether --with-cups-include was given.
51748if test "${with_cups_include+set}" = set; then :
51749  withval=$with_cups_include;
51750fi
51751
51752
51753  if test "x$NEEDS_LIB_CUPS" = xfalse; then
51754    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
51755        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
51756      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
51757$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
51758    fi
51759    CUPS_CFLAGS=
51760  else
51761    CUPS_FOUND=no
51762
51763    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
51764      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
51765    fi
51766
51767    if test "x${with_cups}" != x; then
51768      CUPS_CFLAGS="-I${with_cups}/include"
51769      CUPS_FOUND=yes
51770    fi
51771    if test "x${with_cups_include}" != x; then
51772      CUPS_CFLAGS="-I${with_cups_include}"
51773      CUPS_FOUND=yes
51774    fi
51775    if test "x$CUPS_FOUND" = xno; then
51776      # Are the cups headers installed in the default /usr/include location?
51777      for ac_header in cups/cups.h cups/ppd.h
51778do :
51779  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51780ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
51781if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51782  cat >>confdefs.h <<_ACEOF
51783#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51784_ACEOF
51785
51786          CUPS_FOUND=yes
51787          CUPS_CFLAGS=
51788          DEFAULT_CUPS=yes
51789
51790fi
51791
51792done
51793
51794    fi
51795    if test "x$CUPS_FOUND" = xno; then
51796      # Getting nervous now? Lets poke around for standard Solaris third-party
51797      # package installation locations.
51798      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51799$as_echo_n "checking for cups headers... " >&6; }
51800      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
51801        # An SFW package seems to be installed!
51802        CUPS_FOUND=yes
51803        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
51804      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
51805        # A CSW package seems to be installed!
51806        CUPS_FOUND=yes
51807        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
51808      fi
51809      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51810$as_echo "$CUPS_FOUND" >&6; }
51811    fi
51812    if test "x$CUPS_FOUND" = xno; then
51813
51814  # Print a helpful message on how to acquire the necessary build dependency.
51815  # cups is the help tag: freetype, cups, alsa etc
51816  MISSING_DEPENDENCY=cups
51817
51818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51819    cygwin_help $MISSING_DEPENDENCY
51820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51821    msys_help $MISSING_DEPENDENCY
51822  else
51823    PKGHANDLER_COMMAND=
51824
51825    case $PKGHANDLER in
51826      apt-get)
51827        apt_help     $MISSING_DEPENDENCY ;;
51828      yum)
51829        yum_help     $MISSING_DEPENDENCY ;;
51830      port)
51831        port_help    $MISSING_DEPENDENCY ;;
51832      pkgutil)
51833        pkgutil_help $MISSING_DEPENDENCY ;;
51834      pkgadd)
51835        pkgadd_help  $MISSING_DEPENDENCY ;;
51836    esac
51837
51838    if test "x$PKGHANDLER_COMMAND" != x; then
51839      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51840    fi
51841  fi
51842
51843      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
51844    fi
51845  fi
51846
51847
51848
51849
51850
51851# Check whether --with-freetype was given.
51852if test "${with_freetype+set}" = set; then :
51853  withval=$with_freetype;
51854fi
51855
51856
51857# Check whether --with-freetype-include was given.
51858if test "${with_freetype_include+set}" = set; then :
51859  withval=$with_freetype_include;
51860fi
51861
51862
51863# Check whether --with-freetype-lib was given.
51864if test "${with_freetype_lib+set}" = set; then :
51865  withval=$with_freetype_lib;
51866fi
51867
51868
51869# Check whether --with-freetype-src was given.
51870if test "${with_freetype_src+set}" = set; then :
51871  withval=$with_freetype_src;
51872fi
51873
51874  # Check whether --enable-freetype-bundling was given.
51875if test "${enable_freetype_bundling+set}" = set; then :
51876  enableval=$enable_freetype_bundling;
51877fi
51878
51879
51880  # Need to specify explicitly since it needs to be overridden on some versions of macosx
51881  FREETYPE_BASE_NAME=freetype
51882  FREETYPE_CFLAGS=
51883  FREETYPE_LIBS=
51884  FREETYPE_BUNDLE_LIB_PATH=
51885
51886  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
51887    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
51888        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
51889        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
51890        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
51891      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
51892$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
51893    fi
51894    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
51895      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
51896$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
51897    fi
51898  else
51899    # freetype is needed to build; go get it!
51900
51901    BUNDLE_FREETYPE="$enable_freetype_bundling"
51902
51903    if  test "x$with_freetype_src" != x; then
51904      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51905        # Try to build freetype if --with-freetype-src was given on Windows
51906
51907  FREETYPE_SRC_PATH="$with_freetype_src"
51908  BUILD_FREETYPE=yes
51909
51910  # Check if the freetype sources are acessible..
51911  if ! test -d $FREETYPE_SRC_PATH; then
51912    { $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
51913$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
51914    BUILD_FREETYPE=no
51915  fi
51916  # ..and contain a vc2010 project file
51917  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
51918  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
51919    { $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
51920$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
51921    BUILD_FREETYPE=no
51922  fi
51923  # Now check if configure found a version of 'msbuild.exe'
51924  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
51925    { $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
51926$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;}
51927    BUILD_FREETYPE=no
51928  fi
51929
51930  # Ready to go..
51931  if test "x$BUILD_FREETYPE" = xyes; then
51932    # msbuild requires trailing slashes for output directories
51933    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
51934    freetype_lib_path_unix="$freetype_lib_path"
51935    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
51936
51937  unix_path="$vcxproj_path"
51938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51939    windows_path=`$CYGPATH -m "$unix_path"`
51940    vcxproj_path="$windows_path"
51941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51942    windows_path=`cmd //c echo $unix_path`
51943    vcxproj_path="$windows_path"
51944  fi
51945
51946
51947  unix_path="$freetype_lib_path"
51948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51949    windows_path=`$CYGPATH -m "$unix_path"`
51950    freetype_lib_path="$windows_path"
51951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51952    windows_path=`cmd //c echo $unix_path`
51953    freetype_lib_path="$windows_path"
51954  fi
51955
51956
51957  unix_path="$freetype_obj_path"
51958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51959    windows_path=`$CYGPATH -m "$unix_path"`
51960    freetype_obj_path="$windows_path"
51961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51962    windows_path=`cmd //c echo $unix_path`
51963    freetype_obj_path="$windows_path"
51964  fi
51965
51966    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51967      freetype_platform=x64
51968    else
51969      freetype_platform=win32
51970    fi
51971
51972    # The original freetype project file is for VS 2010 (i.e. 'v100'),
51973    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
51974    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
51975    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
51976    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
51977$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
51978
51979    # First we try to build the freetype.dll
51980    $ECHO -e "@echo off\n"\
51981        "$MSBUILD $vcxproj_path "\
51982        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51983        "/p:Configuration=\"Release Multithreaded\" "\
51984        "/p:Platform=$freetype_platform "\
51985        "/p:ConfigurationType=DynamicLibrary "\
51986        "/p:TargetName=freetype "\
51987        "/p:OutDir=\"$freetype_lib_path\" "\
51988        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
51989    cmd /c freetype.bat
51990
51991    if test -s "$freetype_lib_path_unix/freetype.dll"; then
51992      # If that succeeds we also build freetype.lib
51993      $ECHO -e "@echo off\n"\
51994          "$MSBUILD $vcxproj_path "\
51995          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51996          "/p:Configuration=\"Release Multithreaded\" "\
51997          "/p:Platform=$freetype_platform "\
51998          "/p:ConfigurationType=StaticLibrary "\
51999          "/p:TargetName=freetype "\
52000          "/p:OutDir=\"$freetype_lib_path\" "\
52001          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
52002      cmd /c freetype.bat
52003
52004      if test -s "$freetype_lib_path_unix/freetype.lib"; then
52005        # Once we build both, lib and dll, set freetype lib and include path appropriately
52006        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
52007        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
52008        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
52009$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
52010      else
52011        BUILD_FREETYPE=no
52012      fi
52013    else
52014      BUILD_FREETYPE=no
52015    fi
52016  fi
52017
52018        if test "x$BUILD_FREETYPE" = xyes; then
52019          # Okay, we built it. Check that it works.
52020
52021  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52022  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52023  METHOD="--with-freetype-src"
52024
52025  # Let's start with an optimistic view of the world :-)
52026  FOUND_FREETYPE=yes
52027
52028  # First look for the canonical freetype main include file ft2build.h.
52029  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52030    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52031    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52032    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52033      # Fail.
52034      FOUND_FREETYPE=no
52035    fi
52036  fi
52037
52038  if test "x$FOUND_FREETYPE" = xyes; then
52039    # Include file found, let's continue the sanity check.
52040    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52041$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52042
52043    # Reset to default value
52044    FREETYPE_BASE_NAME=freetype
52045    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52046    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52047      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52048          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52049        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52050        # for the .6 version explicitly.
52051        FREETYPE_BASE_NAME=freetype.6
52052        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52053        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52054$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52055      else
52056        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52057$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52058        FOUND_FREETYPE=no
52059      fi
52060    else
52061      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52062        # On Windows, we will need both .lib and .dll file.
52063        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52064          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52065$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52066          FOUND_FREETYPE=no
52067        fi
52068      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52069          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52070        # Found lib in isa dir, use that instead.
52071        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52072        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52073$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52074      fi
52075    fi
52076  fi
52077
52078  if test "x$FOUND_FREETYPE" = xyes; then
52079
52080  # Only process if variable expands to non-empty
52081
52082  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52083    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52084
52085  # Input might be given as Windows format, start by converting to
52086  # unix format.
52087  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52088  new_path=`$CYGPATH -u "$path"`
52089
52090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52093  # "foo.exe" is OK but "foo" is an error.
52094  #
52095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52096  # It is also a way to make sure we got the proper file name for the real test later on.
52097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52098  if test "x$test_shortpath" = x; then
52099    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52100$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52101    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52102  fi
52103
52104  # Call helper function which possibly converts this using DOS-style short mode.
52105  # If so, the updated path is stored in $new_path.
52106
52107  input_path="$new_path"
52108  # Check if we need to convert this using DOS-style short mode. If the path
52109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52110  # take no chances and rewrite it.
52111  # Note: m4 eats our [], so we need to use [ and ] instead.
52112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52113  if test "x$has_forbidden_chars" != x; then
52114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52118      # Going to short mode and back again did indeed matter. Since short mode is
52119      # case insensitive, let's make it lowercase to improve readability.
52120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52121      # Now convert it back to Unix-style (cygpath)
52122      input_path=`$CYGPATH -u "$shortmode_path"`
52123      new_path="$input_path"
52124    fi
52125  fi
52126
52127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52128  if test "x$test_cygdrive_prefix" = x; then
52129    # As a simple fix, exclude /usr/bin since it's not a real path.
52130    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52132      # a path prefixed by /cygdrive for fixpath to work.
52133      new_path="$CYGWIN_ROOT_PATH$input_path"
52134    fi
52135  fi
52136
52137
52138  if test "x$path" != "x$new_path"; then
52139    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52141$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52142  fi
52143
52144    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52145
52146  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52147  has_colon=`$ECHO $path | $GREP ^.:`
52148  new_path="$path"
52149  if test "x$has_colon" = x; then
52150    # Not in mixed or Windows style, start by that.
52151    new_path=`cmd //c echo $path`
52152  fi
52153
52154
52155  input_path="$new_path"
52156  # Check if we need to convert this using DOS-style short mode. If the path
52157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52158  # take no chances and rewrite it.
52159  # Note: m4 eats our [], so we need to use [ and ] instead.
52160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52161  if test "x$has_forbidden_chars" != x; then
52162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52164  fi
52165
52166
52167  windows_path="$new_path"
52168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52169    unix_path=`$CYGPATH -u "$windows_path"`
52170    new_path="$unix_path"
52171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52173    new_path="$unix_path"
52174  fi
52175
52176  if test "x$path" != "x$new_path"; then
52177    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52179$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52180  fi
52181
52182  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52183  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52184
52185    else
52186      # We're on a unix platform. Hooray! :)
52187      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52188      has_space=`$ECHO "$path" | $GREP " "`
52189      if test "x$has_space" != x; then
52190        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52191$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52192        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52193      fi
52194
52195      # Use eval to expand a potential ~
52196      eval path="$path"
52197      if test ! -f "$path" && test ! -d "$path"; then
52198        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52199      fi
52200
52201      if test -d "$path"; then
52202        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52203      else
52204        dir="`$DIRNAME "$path"`"
52205        base="`$BASENAME "$path"`"
52206        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52207      fi
52208    fi
52209  fi
52210
52211
52212  # Only process if variable expands to non-empty
52213
52214  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52216
52217  # Input might be given as Windows format, start by converting to
52218  # unix format.
52219  path="$POTENTIAL_FREETYPE_LIB_PATH"
52220  new_path=`$CYGPATH -u "$path"`
52221
52222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52225  # "foo.exe" is OK but "foo" is an error.
52226  #
52227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52228  # It is also a way to make sure we got the proper file name for the real test later on.
52229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52230  if test "x$test_shortpath" = x; then
52231    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52232$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52233    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52234  fi
52235
52236  # Call helper function which possibly converts this using DOS-style short mode.
52237  # If so, the updated path is stored in $new_path.
52238
52239  input_path="$new_path"
52240  # Check if we need to convert this using DOS-style short mode. If the path
52241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52242  # take no chances and rewrite it.
52243  # Note: m4 eats our [], so we need to use [ and ] instead.
52244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52245  if test "x$has_forbidden_chars" != x; then
52246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52250      # Going to short mode and back again did indeed matter. Since short mode is
52251      # case insensitive, let's make it lowercase to improve readability.
52252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52253      # Now convert it back to Unix-style (cygpath)
52254      input_path=`$CYGPATH -u "$shortmode_path"`
52255      new_path="$input_path"
52256    fi
52257  fi
52258
52259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52260  if test "x$test_cygdrive_prefix" = x; then
52261    # As a simple fix, exclude /usr/bin since it's not a real path.
52262    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52264      # a path prefixed by /cygdrive for fixpath to work.
52265      new_path="$CYGWIN_ROOT_PATH$input_path"
52266    fi
52267  fi
52268
52269
52270  if test "x$path" != "x$new_path"; then
52271    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52273$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52274  fi
52275
52276    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52277
52278  path="$POTENTIAL_FREETYPE_LIB_PATH"
52279  has_colon=`$ECHO $path | $GREP ^.:`
52280  new_path="$path"
52281  if test "x$has_colon" = x; then
52282    # Not in mixed or Windows style, start by that.
52283    new_path=`cmd //c echo $path`
52284  fi
52285
52286
52287  input_path="$new_path"
52288  # Check if we need to convert this using DOS-style short mode. If the path
52289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52290  # take no chances and rewrite it.
52291  # Note: m4 eats our [], so we need to use [ and ] instead.
52292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52293  if test "x$has_forbidden_chars" != x; then
52294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52296  fi
52297
52298
52299  windows_path="$new_path"
52300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52301    unix_path=`$CYGPATH -u "$windows_path"`
52302    new_path="$unix_path"
52303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52305    new_path="$unix_path"
52306  fi
52307
52308  if test "x$path" != "x$new_path"; then
52309    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52311$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52312  fi
52313
52314  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52315  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52316
52317    else
52318      # We're on a unix platform. Hooray! :)
52319      path="$POTENTIAL_FREETYPE_LIB_PATH"
52320      has_space=`$ECHO "$path" | $GREP " "`
52321      if test "x$has_space" != x; then
52322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52323$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52324        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52325      fi
52326
52327      # Use eval to expand a potential ~
52328      eval path="$path"
52329      if test ! -f "$path" && test ! -d "$path"; then
52330        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52331      fi
52332
52333      if test -d "$path"; then
52334        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52335      else
52336        dir="`$DIRNAME "$path"`"
52337        base="`$BASENAME "$path"`"
52338        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52339      fi
52340    fi
52341  fi
52342
52343
52344    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52345    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52346$as_echo_n "checking for freetype includes... " >&6; }
52347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52348$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52349    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52350    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52351$as_echo_n "checking for freetype libraries... " >&6; }
52352    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52353$as_echo "$FREETYPE_LIB_PATH" >&6; }
52354  fi
52355
52356          if test "x$FOUND_FREETYPE" != xyes; then
52357            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
52358          fi
52359        else
52360          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
52361$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
52362          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
52363        fi
52364      else
52365        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
52366$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
52367      fi
52368    fi
52369
52370    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
52371      # User has specified settings
52372
52373      if test "x$BUNDLE_FREETYPE" = x; then
52374        # If not specified, default is to bundle freetype
52375        BUNDLE_FREETYPE=yes
52376      fi
52377
52378      if test "x$with_freetype" != x; then
52379        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
52380        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
52381      fi
52382
52383      # Allow --with-freetype-lib and --with-freetype-include to override
52384      if test "x$with_freetype_include" != x; then
52385        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
52386      fi
52387      if test "x$with_freetype_lib" != x; then
52388        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
52389      fi
52390
52391      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52392        # Okay, we got it. Check that it works.
52393
52394  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52395  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52396  METHOD="--with-freetype"
52397
52398  # Let's start with an optimistic view of the world :-)
52399  FOUND_FREETYPE=yes
52400
52401  # First look for the canonical freetype main include file ft2build.h.
52402  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52403    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52404    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52405    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52406      # Fail.
52407      FOUND_FREETYPE=no
52408    fi
52409  fi
52410
52411  if test "x$FOUND_FREETYPE" = xyes; then
52412    # Include file found, let's continue the sanity check.
52413    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52414$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52415
52416    # Reset to default value
52417    FREETYPE_BASE_NAME=freetype
52418    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52419    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52420      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52421          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52422        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52423        # for the .6 version explicitly.
52424        FREETYPE_BASE_NAME=freetype.6
52425        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52426        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52427$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52428      else
52429        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52430$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52431        FOUND_FREETYPE=no
52432      fi
52433    else
52434      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52435        # On Windows, we will need both .lib and .dll file.
52436        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52437          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52438$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52439          FOUND_FREETYPE=no
52440        fi
52441      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52442          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52443        # Found lib in isa dir, use that instead.
52444        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52445        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52446$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52447      fi
52448    fi
52449  fi
52450
52451  if test "x$FOUND_FREETYPE" = xyes; then
52452
52453  # Only process if variable expands to non-empty
52454
52455  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52456    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52457
52458  # Input might be given as Windows format, start by converting to
52459  # unix format.
52460  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52461  new_path=`$CYGPATH -u "$path"`
52462
52463  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52464  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52465  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52466  # "foo.exe" is OK but "foo" is an error.
52467  #
52468  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52469  # It is also a way to make sure we got the proper file name for the real test later on.
52470  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52471  if test "x$test_shortpath" = x; then
52472    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52473$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52474    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52475  fi
52476
52477  # Call helper function which possibly converts this using DOS-style short mode.
52478  # If so, the updated path is stored in $new_path.
52479
52480  input_path="$new_path"
52481  # Check if we need to convert this using DOS-style short mode. If the path
52482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52483  # take no chances and rewrite it.
52484  # Note: m4 eats our [], so we need to use [ and ] instead.
52485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52486  if test "x$has_forbidden_chars" != x; then
52487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52491      # Going to short mode and back again did indeed matter. Since short mode is
52492      # case insensitive, let's make it lowercase to improve readability.
52493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52494      # Now convert it back to Unix-style (cygpath)
52495      input_path=`$CYGPATH -u "$shortmode_path"`
52496      new_path="$input_path"
52497    fi
52498  fi
52499
52500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52501  if test "x$test_cygdrive_prefix" = x; then
52502    # As a simple fix, exclude /usr/bin since it's not a real path.
52503    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52505      # a path prefixed by /cygdrive for fixpath to work.
52506      new_path="$CYGWIN_ROOT_PATH$input_path"
52507    fi
52508  fi
52509
52510
52511  if test "x$path" != "x$new_path"; then
52512    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52514$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52515  fi
52516
52517    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52518
52519  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52520  has_colon=`$ECHO $path | $GREP ^.:`
52521  new_path="$path"
52522  if test "x$has_colon" = x; then
52523    # Not in mixed or Windows style, start by that.
52524    new_path=`cmd //c echo $path`
52525  fi
52526
52527
52528  input_path="$new_path"
52529  # Check if we need to convert this using DOS-style short mode. If the path
52530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52531  # take no chances and rewrite it.
52532  # Note: m4 eats our [], so we need to use [ and ] instead.
52533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52534  if test "x$has_forbidden_chars" != x; then
52535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52536    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52537  fi
52538
52539
52540  windows_path="$new_path"
52541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52542    unix_path=`$CYGPATH -u "$windows_path"`
52543    new_path="$unix_path"
52544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52546    new_path="$unix_path"
52547  fi
52548
52549  if test "x$path" != "x$new_path"; then
52550    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52552$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52553  fi
52554
52555  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52556  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52557
52558    else
52559      # We're on a unix platform. Hooray! :)
52560      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52561      has_space=`$ECHO "$path" | $GREP " "`
52562      if test "x$has_space" != x; then
52563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52564$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52565        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52566      fi
52567
52568      # Use eval to expand a potential ~
52569      eval path="$path"
52570      if test ! -f "$path" && test ! -d "$path"; then
52571        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52572      fi
52573
52574      if test -d "$path"; then
52575        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52576      else
52577        dir="`$DIRNAME "$path"`"
52578        base="`$BASENAME "$path"`"
52579        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52580      fi
52581    fi
52582  fi
52583
52584
52585  # Only process if variable expands to non-empty
52586
52587  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52588    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52589
52590  # Input might be given as Windows format, start by converting to
52591  # unix format.
52592  path="$POTENTIAL_FREETYPE_LIB_PATH"
52593  new_path=`$CYGPATH -u "$path"`
52594
52595  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52596  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52597  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52598  # "foo.exe" is OK but "foo" is an error.
52599  #
52600  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52601  # It is also a way to make sure we got the proper file name for the real test later on.
52602  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52603  if test "x$test_shortpath" = x; then
52604    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52605$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52606    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52607  fi
52608
52609  # Call helper function which possibly converts this using DOS-style short mode.
52610  # If so, the updated path is stored in $new_path.
52611
52612  input_path="$new_path"
52613  # Check if we need to convert this using DOS-style short mode. If the path
52614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52615  # take no chances and rewrite it.
52616  # Note: m4 eats our [], so we need to use [ and ] instead.
52617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52618  if test "x$has_forbidden_chars" != x; then
52619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52623      # Going to short mode and back again did indeed matter. Since short mode is
52624      # case insensitive, let's make it lowercase to improve readability.
52625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52626      # Now convert it back to Unix-style (cygpath)
52627      input_path=`$CYGPATH -u "$shortmode_path"`
52628      new_path="$input_path"
52629    fi
52630  fi
52631
52632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52633  if test "x$test_cygdrive_prefix" = x; then
52634    # As a simple fix, exclude /usr/bin since it's not a real path.
52635    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52637      # a path prefixed by /cygdrive for fixpath to work.
52638      new_path="$CYGWIN_ROOT_PATH$input_path"
52639    fi
52640  fi
52641
52642
52643  if test "x$path" != "x$new_path"; then
52644    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52646$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52647  fi
52648
52649    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52650
52651  path="$POTENTIAL_FREETYPE_LIB_PATH"
52652  has_colon=`$ECHO $path | $GREP ^.:`
52653  new_path="$path"
52654  if test "x$has_colon" = x; then
52655    # Not in mixed or Windows style, start by that.
52656    new_path=`cmd //c echo $path`
52657  fi
52658
52659
52660  input_path="$new_path"
52661  # Check if we need to convert this using DOS-style short mode. If the path
52662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52663  # take no chances and rewrite it.
52664  # Note: m4 eats our [], so we need to use [ and ] instead.
52665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52666  if test "x$has_forbidden_chars" != x; then
52667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52669  fi
52670
52671
52672  windows_path="$new_path"
52673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52674    unix_path=`$CYGPATH -u "$windows_path"`
52675    new_path="$unix_path"
52676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52678    new_path="$unix_path"
52679  fi
52680
52681  if test "x$path" != "x$new_path"; then
52682    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52684$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52685  fi
52686
52687  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52688  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52689
52690    else
52691      # We're on a unix platform. Hooray! :)
52692      path="$POTENTIAL_FREETYPE_LIB_PATH"
52693      has_space=`$ECHO "$path" | $GREP " "`
52694      if test "x$has_space" != x; then
52695        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52696$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52697        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52698      fi
52699
52700      # Use eval to expand a potential ~
52701      eval path="$path"
52702      if test ! -f "$path" && test ! -d "$path"; then
52703        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52704      fi
52705
52706      if test -d "$path"; then
52707        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52708      else
52709        dir="`$DIRNAME "$path"`"
52710        base="`$BASENAME "$path"`"
52711        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52712      fi
52713    fi
52714  fi
52715
52716
52717    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52718    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52719$as_echo_n "checking for freetype includes... " >&6; }
52720    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52721$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52722    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52723    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52724$as_echo_n "checking for freetype libraries... " >&6; }
52725    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52726$as_echo "$FREETYPE_LIB_PATH" >&6; }
52727  fi
52728
52729        if test "x$FOUND_FREETYPE" != xyes; then
52730          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
52731        fi
52732      else
52733        # User specified only one of lib or include. This is an error.
52734        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
52735          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
52736$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
52737          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52738        else
52739          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
52740$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
52741          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52742        fi
52743      fi
52744    else
52745      # User did not specify settings, but we need freetype. Try to locate it.
52746
52747      if test "x$BUNDLE_FREETYPE" = x; then
52748        # If not specified, default is to bundle freetype only on windows
52749        if test "x$OPENJDK_TARGET_OS" = xwindows; then
52750          BUNDLE_FREETYPE=yes
52751        else
52752          BUNDLE_FREETYPE=no
52753        fi
52754      fi
52755
52756      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
52757      if test "x$SYSROOT" = x; then
52758        if test "x$FOUND_FREETYPE" != xyes; then
52759          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
52760          if test "x$PKG_CONFIG" != x; then
52761
52762pkg_failed=no
52763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
52764$as_echo_n "checking for FREETYPE... " >&6; }
52765
52766if test -n "$FREETYPE_CFLAGS"; then
52767    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
52768 elif test -n "$PKG_CONFIG"; then
52769    if test -n "$PKG_CONFIG" && \
52770    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52771  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52772  ac_status=$?
52773  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52774  test $ac_status = 0; }; then
52775  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
52776else
52777  pkg_failed=yes
52778fi
52779 else
52780    pkg_failed=untried
52781fi
52782if test -n "$FREETYPE_LIBS"; then
52783    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
52784 elif test -n "$PKG_CONFIG"; then
52785    if test -n "$PKG_CONFIG" && \
52786    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52787  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52788  ac_status=$?
52789  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52790  test $ac_status = 0; }; then
52791  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
52792else
52793  pkg_failed=yes
52794fi
52795 else
52796    pkg_failed=untried
52797fi
52798
52799
52800
52801if test $pkg_failed = yes; then
52802
52803if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52804        _pkg_short_errors_supported=yes
52805else
52806        _pkg_short_errors_supported=no
52807fi
52808        if test $_pkg_short_errors_supported = yes; then
52809	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
52810        else
52811	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
52812        fi
52813	# Put the nasty error message in config.log where it belongs
52814	echo "$FREETYPE_PKG_ERRORS" >&5
52815
52816	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52817$as_echo "no" >&6; }
52818                FOUND_FREETYPE=no
52819elif test $pkg_failed = untried; then
52820	FOUND_FREETYPE=no
52821else
52822	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
52823	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
52824        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52825$as_echo "yes" >&6; }
52826	FOUND_FREETYPE=yes
52827fi
52828            if test "x$FOUND_FREETYPE" = xyes; then
52829              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
52830              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
52831              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
52832              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52833                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
52834              fi
52835              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
52836              if test "x$BUNDLE_FREETYPE" = xyes; then
52837                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
52838$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
52839                FOUND_FREETYPE=no
52840              else
52841                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
52842$as_echo_n "checking for freetype... " >&6; }
52843                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
52844$as_echo "yes (using pkg-config)" >&6; }
52845              fi
52846            fi
52847          fi
52848        fi
52849      fi
52850
52851      if test "x$FOUND_FREETYPE" != xyes; then
52852        # Check in well-known locations
52853        if test "x$OPENJDK_TARGET_OS" = xwindows; then
52854          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
52855
52856  windows_path="$FREETYPE_BASE_DIR"
52857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52858    unix_path=`$CYGPATH -u "$windows_path"`
52859    FREETYPE_BASE_DIR="$unix_path"
52860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52862    FREETYPE_BASE_DIR="$unix_path"
52863  fi
52864
52865
52866  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52867  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52868  METHOD="well-known location"
52869
52870  # Let's start with an optimistic view of the world :-)
52871  FOUND_FREETYPE=yes
52872
52873  # First look for the canonical freetype main include file ft2build.h.
52874  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52875    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52876    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52877    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52878      # Fail.
52879      FOUND_FREETYPE=no
52880    fi
52881  fi
52882
52883  if test "x$FOUND_FREETYPE" = xyes; then
52884    # Include file found, let's continue the sanity check.
52885    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52886$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52887
52888    # Reset to default value
52889    FREETYPE_BASE_NAME=freetype
52890    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52891    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52892      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52893          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52894        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52895        # for the .6 version explicitly.
52896        FREETYPE_BASE_NAME=freetype.6
52897        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52898        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52899$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52900      else
52901        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52902$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52903        FOUND_FREETYPE=no
52904      fi
52905    else
52906      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52907        # On Windows, we will need both .lib and .dll file.
52908        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52909          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52910$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52911          FOUND_FREETYPE=no
52912        fi
52913      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52914          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52915        # Found lib in isa dir, use that instead.
52916        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52917        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52918$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52919      fi
52920    fi
52921  fi
52922
52923  if test "x$FOUND_FREETYPE" = xyes; then
52924
52925  # Only process if variable expands to non-empty
52926
52927  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52928    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52929
52930  # Input might be given as Windows format, start by converting to
52931  # unix format.
52932  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52933  new_path=`$CYGPATH -u "$path"`
52934
52935  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52936  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52937  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52938  # "foo.exe" is OK but "foo" is an error.
52939  #
52940  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52941  # It is also a way to make sure we got the proper file name for the real test later on.
52942  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52943  if test "x$test_shortpath" = x; then
52944    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52945$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52946    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52947  fi
52948
52949  # Call helper function which possibly converts this using DOS-style short mode.
52950  # If so, the updated path is stored in $new_path.
52951
52952  input_path="$new_path"
52953  # Check if we need to convert this using DOS-style short mode. If the path
52954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52955  # take no chances and rewrite it.
52956  # Note: m4 eats our [], so we need to use [ and ] instead.
52957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52958  if test "x$has_forbidden_chars" != x; then
52959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52960    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52961    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52962    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52963      # Going to short mode and back again did indeed matter. Since short mode is
52964      # case insensitive, let's make it lowercase to improve readability.
52965      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52966      # Now convert it back to Unix-style (cygpath)
52967      input_path=`$CYGPATH -u "$shortmode_path"`
52968      new_path="$input_path"
52969    fi
52970  fi
52971
52972  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52973  if test "x$test_cygdrive_prefix" = x; then
52974    # As a simple fix, exclude /usr/bin since it's not a real path.
52975    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52976      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52977      # a path prefixed by /cygdrive for fixpath to work.
52978      new_path="$CYGWIN_ROOT_PATH$input_path"
52979    fi
52980  fi
52981
52982
52983  if test "x$path" != "x$new_path"; then
52984    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52986$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52987  fi
52988
52989    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52990
52991  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52992  has_colon=`$ECHO $path | $GREP ^.:`
52993  new_path="$path"
52994  if test "x$has_colon" = x; then
52995    # Not in mixed or Windows style, start by that.
52996    new_path=`cmd //c echo $path`
52997  fi
52998
52999
53000  input_path="$new_path"
53001  # Check if we need to convert this using DOS-style short mode. If the path
53002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53003  # take no chances and rewrite it.
53004  # Note: m4 eats our [], so we need to use [ and ] instead.
53005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53006  if test "x$has_forbidden_chars" != x; then
53007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53009  fi
53010
53011
53012  windows_path="$new_path"
53013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53014    unix_path=`$CYGPATH -u "$windows_path"`
53015    new_path="$unix_path"
53016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53018    new_path="$unix_path"
53019  fi
53020
53021  if test "x$path" != "x$new_path"; then
53022    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53024$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53025  fi
53026
53027  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53028  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53029
53030    else
53031      # We're on a unix platform. Hooray! :)
53032      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53033      has_space=`$ECHO "$path" | $GREP " "`
53034      if test "x$has_space" != x; then
53035        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53036$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53037        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53038      fi
53039
53040      # Use eval to expand a potential ~
53041      eval path="$path"
53042      if test ! -f "$path" && test ! -d "$path"; then
53043        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53044      fi
53045
53046      if test -d "$path"; then
53047        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53048      else
53049        dir="`$DIRNAME "$path"`"
53050        base="`$BASENAME "$path"`"
53051        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53052      fi
53053    fi
53054  fi
53055
53056
53057  # Only process if variable expands to non-empty
53058
53059  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53060    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53061
53062  # Input might be given as Windows format, start by converting to
53063  # unix format.
53064  path="$POTENTIAL_FREETYPE_LIB_PATH"
53065  new_path=`$CYGPATH -u "$path"`
53066
53067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53070  # "foo.exe" is OK but "foo" is an error.
53071  #
53072  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53073  # It is also a way to make sure we got the proper file name for the real test later on.
53074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53075  if test "x$test_shortpath" = x; then
53076    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53077$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53078    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53079  fi
53080
53081  # Call helper function which possibly converts this using DOS-style short mode.
53082  # If so, the updated path is stored in $new_path.
53083
53084  input_path="$new_path"
53085  # Check if we need to convert this using DOS-style short mode. If the path
53086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53087  # take no chances and rewrite it.
53088  # Note: m4 eats our [], so we need to use [ and ] instead.
53089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53090  if test "x$has_forbidden_chars" != x; then
53091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53092    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53093    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53094    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53095      # Going to short mode and back again did indeed matter. Since short mode is
53096      # case insensitive, let's make it lowercase to improve readability.
53097      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53098      # Now convert it back to Unix-style (cygpath)
53099      input_path=`$CYGPATH -u "$shortmode_path"`
53100      new_path="$input_path"
53101    fi
53102  fi
53103
53104  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53105  if test "x$test_cygdrive_prefix" = x; then
53106    # As a simple fix, exclude /usr/bin since it's not a real path.
53107    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53108      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53109      # a path prefixed by /cygdrive for fixpath to work.
53110      new_path="$CYGWIN_ROOT_PATH$input_path"
53111    fi
53112  fi
53113
53114
53115  if test "x$path" != "x$new_path"; then
53116    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53118$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53119  fi
53120
53121    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53122
53123  path="$POTENTIAL_FREETYPE_LIB_PATH"
53124  has_colon=`$ECHO $path | $GREP ^.:`
53125  new_path="$path"
53126  if test "x$has_colon" = x; then
53127    # Not in mixed or Windows style, start by that.
53128    new_path=`cmd //c echo $path`
53129  fi
53130
53131
53132  input_path="$new_path"
53133  # Check if we need to convert this using DOS-style short mode. If the path
53134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53135  # take no chances and rewrite it.
53136  # Note: m4 eats our [], so we need to use [ and ] instead.
53137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53138  if test "x$has_forbidden_chars" != x; then
53139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53140    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53141  fi
53142
53143
53144  windows_path="$new_path"
53145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53146    unix_path=`$CYGPATH -u "$windows_path"`
53147    new_path="$unix_path"
53148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53150    new_path="$unix_path"
53151  fi
53152
53153  if test "x$path" != "x$new_path"; then
53154    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53156$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53157  fi
53158
53159  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53160  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53161
53162    else
53163      # We're on a unix platform. Hooray! :)
53164      path="$POTENTIAL_FREETYPE_LIB_PATH"
53165      has_space=`$ECHO "$path" | $GREP " "`
53166      if test "x$has_space" != x; then
53167        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53168$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53169        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53170      fi
53171
53172      # Use eval to expand a potential ~
53173      eval path="$path"
53174      if test ! -f "$path" && test ! -d "$path"; then
53175        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53176      fi
53177
53178      if test -d "$path"; then
53179        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53180      else
53181        dir="`$DIRNAME "$path"`"
53182        base="`$BASENAME "$path"`"
53183        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53184      fi
53185    fi
53186  fi
53187
53188
53189    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53191$as_echo_n "checking for freetype includes... " >&6; }
53192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53193$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53194    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53195    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53196$as_echo_n "checking for freetype libraries... " >&6; }
53197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53198$as_echo "$FREETYPE_LIB_PATH" >&6; }
53199  fi
53200
53201          if test "x$FOUND_FREETYPE" != xyes; then
53202            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
53203
53204  windows_path="$FREETYPE_BASE_DIR"
53205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53206    unix_path=`$CYGPATH -u "$windows_path"`
53207    FREETYPE_BASE_DIR="$unix_path"
53208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53210    FREETYPE_BASE_DIR="$unix_path"
53211  fi
53212
53213
53214  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53215  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53216  METHOD="well-known location"
53217
53218  # Let's start with an optimistic view of the world :-)
53219  FOUND_FREETYPE=yes
53220
53221  # First look for the canonical freetype main include file ft2build.h.
53222  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53223    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53224    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53225    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53226      # Fail.
53227      FOUND_FREETYPE=no
53228    fi
53229  fi
53230
53231  if test "x$FOUND_FREETYPE" = xyes; then
53232    # Include file found, let's continue the sanity check.
53233    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53234$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53235
53236    # Reset to default value
53237    FREETYPE_BASE_NAME=freetype
53238    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53239    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53240      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53241          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53242        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53243        # for the .6 version explicitly.
53244        FREETYPE_BASE_NAME=freetype.6
53245        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53246        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53247$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53248      else
53249        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53250$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53251        FOUND_FREETYPE=no
53252      fi
53253    else
53254      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53255        # On Windows, we will need both .lib and .dll file.
53256        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53257          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53258$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53259          FOUND_FREETYPE=no
53260        fi
53261      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53262          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53263        # Found lib in isa dir, use that instead.
53264        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53265        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53266$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53267      fi
53268    fi
53269  fi
53270
53271  if test "x$FOUND_FREETYPE" = xyes; then
53272
53273  # Only process if variable expands to non-empty
53274
53275  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53277
53278  # Input might be given as Windows format, start by converting to
53279  # unix format.
53280  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53281  new_path=`$CYGPATH -u "$path"`
53282
53283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53286  # "foo.exe" is OK but "foo" is an error.
53287  #
53288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53289  # It is also a way to make sure we got the proper file name for the real test later on.
53290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53291  if test "x$test_shortpath" = x; then
53292    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53293$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53294    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53295  fi
53296
53297  # Call helper function which possibly converts this using DOS-style short mode.
53298  # If so, the updated path is stored in $new_path.
53299
53300  input_path="$new_path"
53301  # Check if we need to convert this using DOS-style short mode. If the path
53302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53303  # take no chances and rewrite it.
53304  # Note: m4 eats our [], so we need to use [ and ] instead.
53305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53306  if test "x$has_forbidden_chars" != x; then
53307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53311      # Going to short mode and back again did indeed matter. Since short mode is
53312      # case insensitive, let's make it lowercase to improve readability.
53313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53314      # Now convert it back to Unix-style (cygpath)
53315      input_path=`$CYGPATH -u "$shortmode_path"`
53316      new_path="$input_path"
53317    fi
53318  fi
53319
53320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53321  if test "x$test_cygdrive_prefix" = x; then
53322    # As a simple fix, exclude /usr/bin since it's not a real path.
53323    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53325      # a path prefixed by /cygdrive for fixpath to work.
53326      new_path="$CYGWIN_ROOT_PATH$input_path"
53327    fi
53328  fi
53329
53330
53331  if test "x$path" != "x$new_path"; then
53332    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53334$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53335  fi
53336
53337    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53338
53339  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53340  has_colon=`$ECHO $path | $GREP ^.:`
53341  new_path="$path"
53342  if test "x$has_colon" = x; then
53343    # Not in mixed or Windows style, start by that.
53344    new_path=`cmd //c echo $path`
53345  fi
53346
53347
53348  input_path="$new_path"
53349  # Check if we need to convert this using DOS-style short mode. If the path
53350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53351  # take no chances and rewrite it.
53352  # Note: m4 eats our [], so we need to use [ and ] instead.
53353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53354  if test "x$has_forbidden_chars" != x; then
53355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53357  fi
53358
53359
53360  windows_path="$new_path"
53361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53362    unix_path=`$CYGPATH -u "$windows_path"`
53363    new_path="$unix_path"
53364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53366    new_path="$unix_path"
53367  fi
53368
53369  if test "x$path" != "x$new_path"; then
53370    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53372$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53373  fi
53374
53375  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53376  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53377
53378    else
53379      # We're on a unix platform. Hooray! :)
53380      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53381      has_space=`$ECHO "$path" | $GREP " "`
53382      if test "x$has_space" != x; then
53383        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53384$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53385        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53386      fi
53387
53388      # Use eval to expand a potential ~
53389      eval path="$path"
53390      if test ! -f "$path" && test ! -d "$path"; then
53391        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53392      fi
53393
53394      if test -d "$path"; then
53395        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53396      else
53397        dir="`$DIRNAME "$path"`"
53398        base="`$BASENAME "$path"`"
53399        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53400      fi
53401    fi
53402  fi
53403
53404
53405  # Only process if variable expands to non-empty
53406
53407  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53408    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53409
53410  # Input might be given as Windows format, start by converting to
53411  # unix format.
53412  path="$POTENTIAL_FREETYPE_LIB_PATH"
53413  new_path=`$CYGPATH -u "$path"`
53414
53415  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53416  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53417  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53418  # "foo.exe" is OK but "foo" is an error.
53419  #
53420  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53421  # It is also a way to make sure we got the proper file name for the real test later on.
53422  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53423  if test "x$test_shortpath" = x; then
53424    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53425$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53426    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53427  fi
53428
53429  # Call helper function which possibly converts this using DOS-style short mode.
53430  # If so, the updated path is stored in $new_path.
53431
53432  input_path="$new_path"
53433  # Check if we need to convert this using DOS-style short mode. If the path
53434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53435  # take no chances and rewrite it.
53436  # Note: m4 eats our [], so we need to use [ and ] instead.
53437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53438  if test "x$has_forbidden_chars" != x; then
53439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53443      # Going to short mode and back again did indeed matter. Since short mode is
53444      # case insensitive, let's make it lowercase to improve readability.
53445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53446      # Now convert it back to Unix-style (cygpath)
53447      input_path=`$CYGPATH -u "$shortmode_path"`
53448      new_path="$input_path"
53449    fi
53450  fi
53451
53452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53453  if test "x$test_cygdrive_prefix" = x; then
53454    # As a simple fix, exclude /usr/bin since it's not a real path.
53455    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53457      # a path prefixed by /cygdrive for fixpath to work.
53458      new_path="$CYGWIN_ROOT_PATH$input_path"
53459    fi
53460  fi
53461
53462
53463  if test "x$path" != "x$new_path"; then
53464    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53466$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53467  fi
53468
53469    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53470
53471  path="$POTENTIAL_FREETYPE_LIB_PATH"
53472  has_colon=`$ECHO $path | $GREP ^.:`
53473  new_path="$path"
53474  if test "x$has_colon" = x; then
53475    # Not in mixed or Windows style, start by that.
53476    new_path=`cmd //c echo $path`
53477  fi
53478
53479
53480  input_path="$new_path"
53481  # Check if we need to convert this using DOS-style short mode. If the path
53482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53483  # take no chances and rewrite it.
53484  # Note: m4 eats our [], so we need to use [ and ] instead.
53485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53486  if test "x$has_forbidden_chars" != x; then
53487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53488    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53489  fi
53490
53491
53492  windows_path="$new_path"
53493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53494    unix_path=`$CYGPATH -u "$windows_path"`
53495    new_path="$unix_path"
53496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53498    new_path="$unix_path"
53499  fi
53500
53501  if test "x$path" != "x$new_path"; then
53502    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53503    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53504$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53505  fi
53506
53507  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53508  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53509
53510    else
53511      # We're on a unix platform. Hooray! :)
53512      path="$POTENTIAL_FREETYPE_LIB_PATH"
53513      has_space=`$ECHO "$path" | $GREP " "`
53514      if test "x$has_space" != x; then
53515        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53516$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53517        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53518      fi
53519
53520      # Use eval to expand a potential ~
53521      eval path="$path"
53522      if test ! -f "$path" && test ! -d "$path"; then
53523        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53524      fi
53525
53526      if test -d "$path"; then
53527        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53528      else
53529        dir="`$DIRNAME "$path"`"
53530        base="`$BASENAME "$path"`"
53531        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53532      fi
53533    fi
53534  fi
53535
53536
53537    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53538    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53539$as_echo_n "checking for freetype includes... " >&6; }
53540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53541$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53542    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53543    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53544$as_echo_n "checking for freetype libraries... " >&6; }
53545    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53546$as_echo "$FREETYPE_LIB_PATH" >&6; }
53547  fi
53548
53549          fi
53550          if test "x$FOUND_FREETYPE" != xyes; then
53551            FREETYPE_BASE_DIR="$HOME/freetype"
53552
53553  windows_path="$FREETYPE_BASE_DIR"
53554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53555    unix_path=`$CYGPATH -u "$windows_path"`
53556    FREETYPE_BASE_DIR="$unix_path"
53557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53559    FREETYPE_BASE_DIR="$unix_path"
53560  fi
53561
53562            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53563
53564  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53565  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
53566  METHOD="well-known location"
53567
53568  # Let's start with an optimistic view of the world :-)
53569  FOUND_FREETYPE=yes
53570
53571  # First look for the canonical freetype main include file ft2build.h.
53572  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53573    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53574    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53575    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53576      # Fail.
53577      FOUND_FREETYPE=no
53578    fi
53579  fi
53580
53581  if test "x$FOUND_FREETYPE" = xyes; then
53582    # Include file found, let's continue the sanity check.
53583    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53584$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53585
53586    # Reset to default value
53587    FREETYPE_BASE_NAME=freetype
53588    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53589    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53590      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53591          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53592        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53593        # for the .6 version explicitly.
53594        FREETYPE_BASE_NAME=freetype.6
53595        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53596        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53597$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53598      else
53599        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53600$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53601        FOUND_FREETYPE=no
53602      fi
53603    else
53604      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53605        # On Windows, we will need both .lib and .dll file.
53606        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53607          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53608$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53609          FOUND_FREETYPE=no
53610        fi
53611      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53612          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53613        # Found lib in isa dir, use that instead.
53614        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53615        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53616$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53617      fi
53618    fi
53619  fi
53620
53621  if test "x$FOUND_FREETYPE" = xyes; then
53622
53623  # Only process if variable expands to non-empty
53624
53625  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53627
53628  # Input might be given as Windows format, start by converting to
53629  # unix format.
53630  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53631  new_path=`$CYGPATH -u "$path"`
53632
53633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53636  # "foo.exe" is OK but "foo" is an error.
53637  #
53638  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53639  # It is also a way to make sure we got the proper file name for the real test later on.
53640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53641  if test "x$test_shortpath" = x; then
53642    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53643$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53644    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53645  fi
53646
53647  # Call helper function which possibly converts this using DOS-style short mode.
53648  # If so, the updated path is stored in $new_path.
53649
53650  input_path="$new_path"
53651  # Check if we need to convert this using DOS-style short mode. If the path
53652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53653  # take no chances and rewrite it.
53654  # Note: m4 eats our [], so we need to use [ and ] instead.
53655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53656  if test "x$has_forbidden_chars" != x; then
53657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53661      # Going to short mode and back again did indeed matter. Since short mode is
53662      # case insensitive, let's make it lowercase to improve readability.
53663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53664      # Now convert it back to Unix-style (cygpath)
53665      input_path=`$CYGPATH -u "$shortmode_path"`
53666      new_path="$input_path"
53667    fi
53668  fi
53669
53670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53671  if test "x$test_cygdrive_prefix" = x; then
53672    # As a simple fix, exclude /usr/bin since it's not a real path.
53673    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53675      # a path prefixed by /cygdrive for fixpath to work.
53676      new_path="$CYGWIN_ROOT_PATH$input_path"
53677    fi
53678  fi
53679
53680
53681  if test "x$path" != "x$new_path"; then
53682    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53684$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53685  fi
53686
53687    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53688
53689  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53690  has_colon=`$ECHO $path | $GREP ^.:`
53691  new_path="$path"
53692  if test "x$has_colon" = x; then
53693    # Not in mixed or Windows style, start by that.
53694    new_path=`cmd //c echo $path`
53695  fi
53696
53697
53698  input_path="$new_path"
53699  # Check if we need to convert this using DOS-style short mode. If the path
53700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53701  # take no chances and rewrite it.
53702  # Note: m4 eats our [], so we need to use [ and ] instead.
53703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53704  if test "x$has_forbidden_chars" != x; then
53705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53707  fi
53708
53709
53710  windows_path="$new_path"
53711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53712    unix_path=`$CYGPATH -u "$windows_path"`
53713    new_path="$unix_path"
53714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53716    new_path="$unix_path"
53717  fi
53718
53719  if test "x$path" != "x$new_path"; then
53720    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53722$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53723  fi
53724
53725  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53726  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53727
53728    else
53729      # We're on a unix platform. Hooray! :)
53730      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53731      has_space=`$ECHO "$path" | $GREP " "`
53732      if test "x$has_space" != x; then
53733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53734$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53735        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53736      fi
53737
53738      # Use eval to expand a potential ~
53739      eval path="$path"
53740      if test ! -f "$path" && test ! -d "$path"; then
53741        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53742      fi
53743
53744      if test -d "$path"; then
53745        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53746      else
53747        dir="`$DIRNAME "$path"`"
53748        base="`$BASENAME "$path"`"
53749        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53750      fi
53751    fi
53752  fi
53753
53754
53755  # Only process if variable expands to non-empty
53756
53757  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53758    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53759
53760  # Input might be given as Windows format, start by converting to
53761  # unix format.
53762  path="$POTENTIAL_FREETYPE_LIB_PATH"
53763  new_path=`$CYGPATH -u "$path"`
53764
53765  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53766  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53767  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53768  # "foo.exe" is OK but "foo" is an error.
53769  #
53770  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53771  # It is also a way to make sure we got the proper file name for the real test later on.
53772  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53773  if test "x$test_shortpath" = x; then
53774    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53775$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53776    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53777  fi
53778
53779  # Call helper function which possibly converts this using DOS-style short mode.
53780  # If so, the updated path is stored in $new_path.
53781
53782  input_path="$new_path"
53783  # Check if we need to convert this using DOS-style short mode. If the path
53784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53785  # take no chances and rewrite it.
53786  # Note: m4 eats our [], so we need to use [ and ] instead.
53787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53788  if test "x$has_forbidden_chars" != x; then
53789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53790    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53791    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53792    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53793      # Going to short mode and back again did indeed matter. Since short mode is
53794      # case insensitive, let's make it lowercase to improve readability.
53795      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53796      # Now convert it back to Unix-style (cygpath)
53797      input_path=`$CYGPATH -u "$shortmode_path"`
53798      new_path="$input_path"
53799    fi
53800  fi
53801
53802  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53803  if test "x$test_cygdrive_prefix" = x; then
53804    # As a simple fix, exclude /usr/bin since it's not a real path.
53805    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53806      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53807      # a path prefixed by /cygdrive for fixpath to work.
53808      new_path="$CYGWIN_ROOT_PATH$input_path"
53809    fi
53810  fi
53811
53812
53813  if test "x$path" != "x$new_path"; then
53814    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53816$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53817  fi
53818
53819    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53820
53821  path="$POTENTIAL_FREETYPE_LIB_PATH"
53822  has_colon=`$ECHO $path | $GREP ^.:`
53823  new_path="$path"
53824  if test "x$has_colon" = x; then
53825    # Not in mixed or Windows style, start by that.
53826    new_path=`cmd //c echo $path`
53827  fi
53828
53829
53830  input_path="$new_path"
53831  # Check if we need to convert this using DOS-style short mode. If the path
53832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53833  # take no chances and rewrite it.
53834  # Note: m4 eats our [], so we need to use [ and ] instead.
53835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53836  if test "x$has_forbidden_chars" != x; then
53837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53838    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53839  fi
53840
53841
53842  windows_path="$new_path"
53843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53844    unix_path=`$CYGPATH -u "$windows_path"`
53845    new_path="$unix_path"
53846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53848    new_path="$unix_path"
53849  fi
53850
53851  if test "x$path" != "x$new_path"; then
53852    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53854$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53855  fi
53856
53857  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53858  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53859
53860    else
53861      # We're on a unix platform. Hooray! :)
53862      path="$POTENTIAL_FREETYPE_LIB_PATH"
53863      has_space=`$ECHO "$path" | $GREP " "`
53864      if test "x$has_space" != x; then
53865        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53866$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53867        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53868      fi
53869
53870      # Use eval to expand a potential ~
53871      eval path="$path"
53872      if test ! -f "$path" && test ! -d "$path"; then
53873        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53874      fi
53875
53876      if test -d "$path"; then
53877        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53878      else
53879        dir="`$DIRNAME "$path"`"
53880        base="`$BASENAME "$path"`"
53881        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53882      fi
53883    fi
53884  fi
53885
53886
53887    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53888    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53889$as_echo_n "checking for freetype includes... " >&6; }
53890    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53891$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53892    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53893    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53894$as_echo_n "checking for freetype libraries... " >&6; }
53895    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53896$as_echo "$FREETYPE_LIB_PATH" >&6; }
53897  fi
53898
53899            else
53900
53901  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53902  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
53903  METHOD="well-known location"
53904
53905  # Let's start with an optimistic view of the world :-)
53906  FOUND_FREETYPE=yes
53907
53908  # First look for the canonical freetype main include file ft2build.h.
53909  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53910    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53911    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53912    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53913      # Fail.
53914      FOUND_FREETYPE=no
53915    fi
53916  fi
53917
53918  if test "x$FOUND_FREETYPE" = xyes; then
53919    # Include file found, let's continue the sanity check.
53920    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53921$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53922
53923    # Reset to default value
53924    FREETYPE_BASE_NAME=freetype
53925    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53926    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53927      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53928          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53929        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53930        # for the .6 version explicitly.
53931        FREETYPE_BASE_NAME=freetype.6
53932        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53933        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53934$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53935      else
53936        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53937$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53938        FOUND_FREETYPE=no
53939      fi
53940    else
53941      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53942        # On Windows, we will need both .lib and .dll file.
53943        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53944          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53945$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53946          FOUND_FREETYPE=no
53947        fi
53948      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53949          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53950        # Found lib in isa dir, use that instead.
53951        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53952        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53953$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53954      fi
53955    fi
53956  fi
53957
53958  if test "x$FOUND_FREETYPE" = xyes; then
53959
53960  # Only process if variable expands to non-empty
53961
53962  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53963    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53964
53965  # Input might be given as Windows format, start by converting to
53966  # unix format.
53967  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53968  new_path=`$CYGPATH -u "$path"`
53969
53970  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53971  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53972  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53973  # "foo.exe" is OK but "foo" is an error.
53974  #
53975  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53976  # It is also a way to make sure we got the proper file name for the real test later on.
53977  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53978  if test "x$test_shortpath" = x; then
53979    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53980$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53981    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53982  fi
53983
53984  # Call helper function which possibly converts this using DOS-style short mode.
53985  # If so, the updated path is stored in $new_path.
53986
53987  input_path="$new_path"
53988  # Check if we need to convert this using DOS-style short mode. If the path
53989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53990  # take no chances and rewrite it.
53991  # Note: m4 eats our [], so we need to use [ and ] instead.
53992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53993  if test "x$has_forbidden_chars" != x; then
53994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53995    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53996    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53997    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53998      # Going to short mode and back again did indeed matter. Since short mode is
53999      # case insensitive, let's make it lowercase to improve readability.
54000      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54001      # Now convert it back to Unix-style (cygpath)
54002      input_path=`$CYGPATH -u "$shortmode_path"`
54003      new_path="$input_path"
54004    fi
54005  fi
54006
54007  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54008  if test "x$test_cygdrive_prefix" = x; then
54009    # As a simple fix, exclude /usr/bin since it's not a real path.
54010    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54011      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54012      # a path prefixed by /cygdrive for fixpath to work.
54013      new_path="$CYGWIN_ROOT_PATH$input_path"
54014    fi
54015  fi
54016
54017
54018  if test "x$path" != "x$new_path"; then
54019    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54020    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54021$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54022  fi
54023
54024    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54025
54026  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54027  has_colon=`$ECHO $path | $GREP ^.:`
54028  new_path="$path"
54029  if test "x$has_colon" = x; then
54030    # Not in mixed or Windows style, start by that.
54031    new_path=`cmd //c echo $path`
54032  fi
54033
54034
54035  input_path="$new_path"
54036  # Check if we need to convert this using DOS-style short mode. If the path
54037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54038  # take no chances and rewrite it.
54039  # Note: m4 eats our [], so we need to use [ and ] instead.
54040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54041  if test "x$has_forbidden_chars" != x; then
54042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54043    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54044  fi
54045
54046
54047  windows_path="$new_path"
54048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54049    unix_path=`$CYGPATH -u "$windows_path"`
54050    new_path="$unix_path"
54051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54053    new_path="$unix_path"
54054  fi
54055
54056  if test "x$path" != "x$new_path"; then
54057    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54058    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54059$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54060  fi
54061
54062  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54063  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54064
54065    else
54066      # We're on a unix platform. Hooray! :)
54067      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54068      has_space=`$ECHO "$path" | $GREP " "`
54069      if test "x$has_space" != x; then
54070        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54071$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54072        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54073      fi
54074
54075      # Use eval to expand a potential ~
54076      eval path="$path"
54077      if test ! -f "$path" && test ! -d "$path"; then
54078        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54079      fi
54080
54081      if test -d "$path"; then
54082        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54083      else
54084        dir="`$DIRNAME "$path"`"
54085        base="`$BASENAME "$path"`"
54086        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54087      fi
54088    fi
54089  fi
54090
54091
54092  # Only process if variable expands to non-empty
54093
54094  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54095    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54096
54097  # Input might be given as Windows format, start by converting to
54098  # unix format.
54099  path="$POTENTIAL_FREETYPE_LIB_PATH"
54100  new_path=`$CYGPATH -u "$path"`
54101
54102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54105  # "foo.exe" is OK but "foo" is an error.
54106  #
54107  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54108  # It is also a way to make sure we got the proper file name for the real test later on.
54109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54110  if test "x$test_shortpath" = x; then
54111    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54112$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54113    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54114  fi
54115
54116  # Call helper function which possibly converts this using DOS-style short mode.
54117  # If so, the updated path is stored in $new_path.
54118
54119  input_path="$new_path"
54120  # Check if we need to convert this using DOS-style short mode. If the path
54121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54122  # take no chances and rewrite it.
54123  # Note: m4 eats our [], so we need to use [ and ] instead.
54124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54125  if test "x$has_forbidden_chars" != x; then
54126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54130      # Going to short mode and back again did indeed matter. Since short mode is
54131      # case insensitive, let's make it lowercase to improve readability.
54132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54133      # Now convert it back to Unix-style (cygpath)
54134      input_path=`$CYGPATH -u "$shortmode_path"`
54135      new_path="$input_path"
54136    fi
54137  fi
54138
54139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54140  if test "x$test_cygdrive_prefix" = x; then
54141    # As a simple fix, exclude /usr/bin since it's not a real path.
54142    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54144      # a path prefixed by /cygdrive for fixpath to work.
54145      new_path="$CYGWIN_ROOT_PATH$input_path"
54146    fi
54147  fi
54148
54149
54150  if test "x$path" != "x$new_path"; then
54151    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54153$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54154  fi
54155
54156    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54157
54158  path="$POTENTIAL_FREETYPE_LIB_PATH"
54159  has_colon=`$ECHO $path | $GREP ^.:`
54160  new_path="$path"
54161  if test "x$has_colon" = x; then
54162    # Not in mixed or Windows style, start by that.
54163    new_path=`cmd //c echo $path`
54164  fi
54165
54166
54167  input_path="$new_path"
54168  # Check if we need to convert this using DOS-style short mode. If the path
54169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54170  # take no chances and rewrite it.
54171  # Note: m4 eats our [], so we need to use [ and ] instead.
54172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54173  if test "x$has_forbidden_chars" != x; then
54174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54176  fi
54177
54178
54179  windows_path="$new_path"
54180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54181    unix_path=`$CYGPATH -u "$windows_path"`
54182    new_path="$unix_path"
54183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54185    new_path="$unix_path"
54186  fi
54187
54188  if test "x$path" != "x$new_path"; then
54189    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54191$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54192  fi
54193
54194  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54195  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54196
54197    else
54198      # We're on a unix platform. Hooray! :)
54199      path="$POTENTIAL_FREETYPE_LIB_PATH"
54200      has_space=`$ECHO "$path" | $GREP " "`
54201      if test "x$has_space" != x; then
54202        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54203$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54204        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54205      fi
54206
54207      # Use eval to expand a potential ~
54208      eval path="$path"
54209      if test ! -f "$path" && test ! -d "$path"; then
54210        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54211      fi
54212
54213      if test -d "$path"; then
54214        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54215      else
54216        dir="`$DIRNAME "$path"`"
54217        base="`$BASENAME "$path"`"
54218        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54219      fi
54220    fi
54221  fi
54222
54223
54224    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54226$as_echo_n "checking for freetype includes... " >&6; }
54227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54228$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54229    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54231$as_echo_n "checking for freetype libraries... " >&6; }
54232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54233$as_echo "$FREETYPE_LIB_PATH" >&6; }
54234  fi
54235
54236            fi
54237            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
54238                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
54239              # Source is available, as a last resort try to build freetype in default location
54240
54241  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
54242  BUILD_FREETYPE=yes
54243
54244  # Check if the freetype sources are acessible..
54245  if ! test -d $FREETYPE_SRC_PATH; then
54246    { $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
54247$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
54248    BUILD_FREETYPE=no
54249  fi
54250  # ..and contain a vc2010 project file
54251  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
54252  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
54253    { $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
54254$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
54255    BUILD_FREETYPE=no
54256  fi
54257  # Now check if configure found a version of 'msbuild.exe'
54258  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
54259    { $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
54260$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;}
54261    BUILD_FREETYPE=no
54262  fi
54263
54264  # Ready to go..
54265  if test "x$BUILD_FREETYPE" = xyes; then
54266    # msbuild requires trailing slashes for output directories
54267    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
54268    freetype_lib_path_unix="$freetype_lib_path"
54269    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
54270
54271  unix_path="$vcxproj_path"
54272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54273    windows_path=`$CYGPATH -m "$unix_path"`
54274    vcxproj_path="$windows_path"
54275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54276    windows_path=`cmd //c echo $unix_path`
54277    vcxproj_path="$windows_path"
54278  fi
54279
54280
54281  unix_path="$freetype_lib_path"
54282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54283    windows_path=`$CYGPATH -m "$unix_path"`
54284    freetype_lib_path="$windows_path"
54285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54286    windows_path=`cmd //c echo $unix_path`
54287    freetype_lib_path="$windows_path"
54288  fi
54289
54290
54291  unix_path="$freetype_obj_path"
54292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54293    windows_path=`$CYGPATH -m "$unix_path"`
54294    freetype_obj_path="$windows_path"
54295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54296    windows_path=`cmd //c echo $unix_path`
54297    freetype_obj_path="$windows_path"
54298  fi
54299
54300    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54301      freetype_platform=x64
54302    else
54303      freetype_platform=win32
54304    fi
54305
54306    # The original freetype project file is for VS 2010 (i.e. 'v100'),
54307    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
54308    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
54309    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
54310    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
54311$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
54312
54313    # First we try to build the freetype.dll
54314    $ECHO -e "@echo off\n"\
54315        "$MSBUILD $vcxproj_path "\
54316        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
54317        "/p:Configuration=\"Release Multithreaded\" "\
54318        "/p:Platform=$freetype_platform "\
54319        "/p:ConfigurationType=DynamicLibrary "\
54320        "/p:TargetName=freetype "\
54321        "/p:OutDir=\"$freetype_lib_path\" "\
54322        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
54323    cmd /c freetype.bat
54324
54325    if test -s "$freetype_lib_path_unix/freetype.dll"; then
54326      # If that succeeds we also build freetype.lib
54327      $ECHO -e "@echo off\n"\
54328          "$MSBUILD $vcxproj_path "\
54329          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
54330          "/p:Configuration=\"Release Multithreaded\" "\
54331          "/p:Platform=$freetype_platform "\
54332          "/p:ConfigurationType=StaticLibrary "\
54333          "/p:TargetName=freetype "\
54334          "/p:OutDir=\"$freetype_lib_path\" "\
54335          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
54336      cmd /c freetype.bat
54337
54338      if test -s "$freetype_lib_path_unix/freetype.lib"; then
54339        # Once we build both, lib and dll, set freetype lib and include path appropriately
54340        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
54341        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
54342        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
54343$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
54344      else
54345        BUILD_FREETYPE=no
54346      fi
54347    else
54348      BUILD_FREETYPE=no
54349    fi
54350  fi
54351
54352              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54353
54354  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54355  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
54356  METHOD="well-known location"
54357
54358  # Let's start with an optimistic view of the world :-)
54359  FOUND_FREETYPE=yes
54360
54361  # First look for the canonical freetype main include file ft2build.h.
54362  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54363    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54364    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54365    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54366      # Fail.
54367      FOUND_FREETYPE=no
54368    fi
54369  fi
54370
54371  if test "x$FOUND_FREETYPE" = xyes; then
54372    # Include file found, let's continue the sanity check.
54373    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54374$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54375
54376    # Reset to default value
54377    FREETYPE_BASE_NAME=freetype
54378    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54379    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54380      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54381          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54382        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54383        # for the .6 version explicitly.
54384        FREETYPE_BASE_NAME=freetype.6
54385        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54386        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54387$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54388      else
54389        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54390$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54391        FOUND_FREETYPE=no
54392      fi
54393    else
54394      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54395        # On Windows, we will need both .lib and .dll file.
54396        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54397          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54398$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54399          FOUND_FREETYPE=no
54400        fi
54401      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54402          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54403        # Found lib in isa dir, use that instead.
54404        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54405        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54406$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54407      fi
54408    fi
54409  fi
54410
54411  if test "x$FOUND_FREETYPE" = xyes; then
54412
54413  # Only process if variable expands to non-empty
54414
54415  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54416    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54417
54418  # Input might be given as Windows format, start by converting to
54419  # unix format.
54420  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54421  new_path=`$CYGPATH -u "$path"`
54422
54423  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54424  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54425  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54426  # "foo.exe" is OK but "foo" is an error.
54427  #
54428  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54429  # It is also a way to make sure we got the proper file name for the real test later on.
54430  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54431  if test "x$test_shortpath" = x; then
54432    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54433$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54434    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54435  fi
54436
54437  # Call helper function which possibly converts this using DOS-style short mode.
54438  # If so, the updated path is stored in $new_path.
54439
54440  input_path="$new_path"
54441  # Check if we need to convert this using DOS-style short mode. If the path
54442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54443  # take no chances and rewrite it.
54444  # Note: m4 eats our [], so we need to use [ and ] instead.
54445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54446  if test "x$has_forbidden_chars" != x; then
54447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54448    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54449    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54450    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54451      # Going to short mode and back again did indeed matter. Since short mode is
54452      # case insensitive, let's make it lowercase to improve readability.
54453      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54454      # Now convert it back to Unix-style (cygpath)
54455      input_path=`$CYGPATH -u "$shortmode_path"`
54456      new_path="$input_path"
54457    fi
54458  fi
54459
54460  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54461  if test "x$test_cygdrive_prefix" = x; then
54462    # As a simple fix, exclude /usr/bin since it's not a real path.
54463    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54464      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54465      # a path prefixed by /cygdrive for fixpath to work.
54466      new_path="$CYGWIN_ROOT_PATH$input_path"
54467    fi
54468  fi
54469
54470
54471  if test "x$path" != "x$new_path"; then
54472    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54474$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54475  fi
54476
54477    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54478
54479  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54480  has_colon=`$ECHO $path | $GREP ^.:`
54481  new_path="$path"
54482  if test "x$has_colon" = x; then
54483    # Not in mixed or Windows style, start by that.
54484    new_path=`cmd //c echo $path`
54485  fi
54486
54487
54488  input_path="$new_path"
54489  # Check if we need to convert this using DOS-style short mode. If the path
54490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54491  # take no chances and rewrite it.
54492  # Note: m4 eats our [], so we need to use [ and ] instead.
54493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54494  if test "x$has_forbidden_chars" != x; then
54495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54497  fi
54498
54499
54500  windows_path="$new_path"
54501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54502    unix_path=`$CYGPATH -u "$windows_path"`
54503    new_path="$unix_path"
54504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54506    new_path="$unix_path"
54507  fi
54508
54509  if test "x$path" != "x$new_path"; then
54510    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54512$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54513  fi
54514
54515  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54516  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54517
54518    else
54519      # We're on a unix platform. Hooray! :)
54520      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54521      has_space=`$ECHO "$path" | $GREP " "`
54522      if test "x$has_space" != x; then
54523        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54524$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54525        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54526      fi
54527
54528      # Use eval to expand a potential ~
54529      eval path="$path"
54530      if test ! -f "$path" && test ! -d "$path"; then
54531        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54532      fi
54533
54534      if test -d "$path"; then
54535        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54536      else
54537        dir="`$DIRNAME "$path"`"
54538        base="`$BASENAME "$path"`"
54539        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54540      fi
54541    fi
54542  fi
54543
54544
54545  # Only process if variable expands to non-empty
54546
54547  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54548    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54549
54550  # Input might be given as Windows format, start by converting to
54551  # unix format.
54552  path="$POTENTIAL_FREETYPE_LIB_PATH"
54553  new_path=`$CYGPATH -u "$path"`
54554
54555  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54556  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54557  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54558  # "foo.exe" is OK but "foo" is an error.
54559  #
54560  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54561  # It is also a way to make sure we got the proper file name for the real test later on.
54562  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54563  if test "x$test_shortpath" = x; then
54564    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54565$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54566    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54567  fi
54568
54569  # Call helper function which possibly converts this using DOS-style short mode.
54570  # If so, the updated path is stored in $new_path.
54571
54572  input_path="$new_path"
54573  # Check if we need to convert this using DOS-style short mode. If the path
54574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54575  # take no chances and rewrite it.
54576  # Note: m4 eats our [], so we need to use [ and ] instead.
54577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54578  if test "x$has_forbidden_chars" != x; then
54579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54583      # Going to short mode and back again did indeed matter. Since short mode is
54584      # case insensitive, let's make it lowercase to improve readability.
54585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54586      # Now convert it back to Unix-style (cygpath)
54587      input_path=`$CYGPATH -u "$shortmode_path"`
54588      new_path="$input_path"
54589    fi
54590  fi
54591
54592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54593  if test "x$test_cygdrive_prefix" = x; then
54594    # As a simple fix, exclude /usr/bin since it's not a real path.
54595    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54597      # a path prefixed by /cygdrive for fixpath to work.
54598      new_path="$CYGWIN_ROOT_PATH$input_path"
54599    fi
54600  fi
54601
54602
54603  if test "x$path" != "x$new_path"; then
54604    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54606$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54607  fi
54608
54609    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54610
54611  path="$POTENTIAL_FREETYPE_LIB_PATH"
54612  has_colon=`$ECHO $path | $GREP ^.:`
54613  new_path="$path"
54614  if test "x$has_colon" = x; then
54615    # Not in mixed or Windows style, start by that.
54616    new_path=`cmd //c echo $path`
54617  fi
54618
54619
54620  input_path="$new_path"
54621  # Check if we need to convert this using DOS-style short mode. If the path
54622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54623  # take no chances and rewrite it.
54624  # Note: m4 eats our [], so we need to use [ and ] instead.
54625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54626  if test "x$has_forbidden_chars" != x; then
54627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54629  fi
54630
54631
54632  windows_path="$new_path"
54633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54634    unix_path=`$CYGPATH -u "$windows_path"`
54635    new_path="$unix_path"
54636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54638    new_path="$unix_path"
54639  fi
54640
54641  if test "x$path" != "x$new_path"; then
54642    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54644$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54645  fi
54646
54647  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54648  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54649
54650    else
54651      # We're on a unix platform. Hooray! :)
54652      path="$POTENTIAL_FREETYPE_LIB_PATH"
54653      has_space=`$ECHO "$path" | $GREP " "`
54654      if test "x$has_space" != x; then
54655        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54656$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54657        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54658      fi
54659
54660      # Use eval to expand a potential ~
54661      eval path="$path"
54662      if test ! -f "$path" && test ! -d "$path"; then
54663        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54664      fi
54665
54666      if test -d "$path"; then
54667        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54668      else
54669        dir="`$DIRNAME "$path"`"
54670        base="`$BASENAME "$path"`"
54671        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54672      fi
54673    fi
54674  fi
54675
54676
54677    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54678    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54679$as_echo_n "checking for freetype includes... " >&6; }
54680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54681$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54682    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54683    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54684$as_echo_n "checking for freetype libraries... " >&6; }
54685    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54686$as_echo "$FREETYPE_LIB_PATH" >&6; }
54687  fi
54688
54689              else
54690
54691  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54692  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
54693  METHOD="well-known location"
54694
54695  # Let's start with an optimistic view of the world :-)
54696  FOUND_FREETYPE=yes
54697
54698  # First look for the canonical freetype main include file ft2build.h.
54699  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54700    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54701    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54702    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54703      # Fail.
54704      FOUND_FREETYPE=no
54705    fi
54706  fi
54707
54708  if test "x$FOUND_FREETYPE" = xyes; then
54709    # Include file found, let's continue the sanity check.
54710    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54711$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54712
54713    # Reset to default value
54714    FREETYPE_BASE_NAME=freetype
54715    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54716    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54717      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54718          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54719        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54720        # for the .6 version explicitly.
54721        FREETYPE_BASE_NAME=freetype.6
54722        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54723        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54724$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54725      else
54726        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54727$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54728        FOUND_FREETYPE=no
54729      fi
54730    else
54731      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54732        # On Windows, we will need both .lib and .dll file.
54733        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54734          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54735$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54736          FOUND_FREETYPE=no
54737        fi
54738      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54739          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54740        # Found lib in isa dir, use that instead.
54741        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54742        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54743$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54744      fi
54745    fi
54746  fi
54747
54748  if test "x$FOUND_FREETYPE" = xyes; then
54749
54750  # Only process if variable expands to non-empty
54751
54752  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54754
54755  # Input might be given as Windows format, start by converting to
54756  # unix format.
54757  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54758  new_path=`$CYGPATH -u "$path"`
54759
54760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54763  # "foo.exe" is OK but "foo" is an error.
54764  #
54765  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54766  # It is also a way to make sure we got the proper file name for the real test later on.
54767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54768  if test "x$test_shortpath" = x; then
54769    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54770$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54771    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54772  fi
54773
54774  # Call helper function which possibly converts this using DOS-style short mode.
54775  # If so, the updated path is stored in $new_path.
54776
54777  input_path="$new_path"
54778  # Check if we need to convert this using DOS-style short mode. If the path
54779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54780  # take no chances and rewrite it.
54781  # Note: m4 eats our [], so we need to use [ and ] instead.
54782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54783  if test "x$has_forbidden_chars" != x; then
54784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54788      # Going to short mode and back again did indeed matter. Since short mode is
54789      # case insensitive, let's make it lowercase to improve readability.
54790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54791      # Now convert it back to Unix-style (cygpath)
54792      input_path=`$CYGPATH -u "$shortmode_path"`
54793      new_path="$input_path"
54794    fi
54795  fi
54796
54797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54798  if test "x$test_cygdrive_prefix" = x; then
54799    # As a simple fix, exclude /usr/bin since it's not a real path.
54800    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54802      # a path prefixed by /cygdrive for fixpath to work.
54803      new_path="$CYGWIN_ROOT_PATH$input_path"
54804    fi
54805  fi
54806
54807
54808  if test "x$path" != "x$new_path"; then
54809    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54811$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54812  fi
54813
54814    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54815
54816  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54817  has_colon=`$ECHO $path | $GREP ^.:`
54818  new_path="$path"
54819  if test "x$has_colon" = x; then
54820    # Not in mixed or Windows style, start by that.
54821    new_path=`cmd //c echo $path`
54822  fi
54823
54824
54825  input_path="$new_path"
54826  # Check if we need to convert this using DOS-style short mode. If the path
54827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54828  # take no chances and rewrite it.
54829  # Note: m4 eats our [], so we need to use [ and ] instead.
54830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54831  if test "x$has_forbidden_chars" != x; then
54832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54834  fi
54835
54836
54837  windows_path="$new_path"
54838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54839    unix_path=`$CYGPATH -u "$windows_path"`
54840    new_path="$unix_path"
54841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54843    new_path="$unix_path"
54844  fi
54845
54846  if test "x$path" != "x$new_path"; then
54847    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54849$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54850  fi
54851
54852  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54853  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54854
54855    else
54856      # We're on a unix platform. Hooray! :)
54857      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54858      has_space=`$ECHO "$path" | $GREP " "`
54859      if test "x$has_space" != x; then
54860        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54861$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54862        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54863      fi
54864
54865      # Use eval to expand a potential ~
54866      eval path="$path"
54867      if test ! -f "$path" && test ! -d "$path"; then
54868        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54869      fi
54870
54871      if test -d "$path"; then
54872        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54873      else
54874        dir="`$DIRNAME "$path"`"
54875        base="`$BASENAME "$path"`"
54876        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54877      fi
54878    fi
54879  fi
54880
54881
54882  # Only process if variable expands to non-empty
54883
54884  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54885    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54886
54887  # Input might be given as Windows format, start by converting to
54888  # unix format.
54889  path="$POTENTIAL_FREETYPE_LIB_PATH"
54890  new_path=`$CYGPATH -u "$path"`
54891
54892  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54893  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54894  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54895  # "foo.exe" is OK but "foo" is an error.
54896  #
54897  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54898  # It is also a way to make sure we got the proper file name for the real test later on.
54899  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54900  if test "x$test_shortpath" = x; then
54901    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54902$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54903    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54904  fi
54905
54906  # Call helper function which possibly converts this using DOS-style short mode.
54907  # If so, the updated path is stored in $new_path.
54908
54909  input_path="$new_path"
54910  # Check if we need to convert this using DOS-style short mode. If the path
54911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54912  # take no chances and rewrite it.
54913  # Note: m4 eats our [], so we need to use [ and ] instead.
54914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54915  if test "x$has_forbidden_chars" != x; then
54916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54917    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54918    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54919    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54920      # Going to short mode and back again did indeed matter. Since short mode is
54921      # case insensitive, let's make it lowercase to improve readability.
54922      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54923      # Now convert it back to Unix-style (cygpath)
54924      input_path=`$CYGPATH -u "$shortmode_path"`
54925      new_path="$input_path"
54926    fi
54927  fi
54928
54929  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54930  if test "x$test_cygdrive_prefix" = x; then
54931    # As a simple fix, exclude /usr/bin since it's not a real path.
54932    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54933      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54934      # a path prefixed by /cygdrive for fixpath to work.
54935      new_path="$CYGWIN_ROOT_PATH$input_path"
54936    fi
54937  fi
54938
54939
54940  if test "x$path" != "x$new_path"; then
54941    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54943$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54944  fi
54945
54946    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54947
54948  path="$POTENTIAL_FREETYPE_LIB_PATH"
54949  has_colon=`$ECHO $path | $GREP ^.:`
54950  new_path="$path"
54951  if test "x$has_colon" = x; then
54952    # Not in mixed or Windows style, start by that.
54953    new_path=`cmd //c echo $path`
54954  fi
54955
54956
54957  input_path="$new_path"
54958  # Check if we need to convert this using DOS-style short mode. If the path
54959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54960  # take no chances and rewrite it.
54961  # Note: m4 eats our [], so we need to use [ and ] instead.
54962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54963  if test "x$has_forbidden_chars" != x; then
54964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54965    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54966  fi
54967
54968
54969  windows_path="$new_path"
54970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54971    unix_path=`$CYGPATH -u "$windows_path"`
54972    new_path="$unix_path"
54973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54975    new_path="$unix_path"
54976  fi
54977
54978  if test "x$path" != "x$new_path"; then
54979    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54981$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54982  fi
54983
54984  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54985  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54986
54987    else
54988      # We're on a unix platform. Hooray! :)
54989      path="$POTENTIAL_FREETYPE_LIB_PATH"
54990      has_space=`$ECHO "$path" | $GREP " "`
54991      if test "x$has_space" != x; then
54992        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54993$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54994        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54995      fi
54996
54997      # Use eval to expand a potential ~
54998      eval path="$path"
54999      if test ! -f "$path" && test ! -d "$path"; then
55000        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55001      fi
55002
55003      if test -d "$path"; then
55004        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55005      else
55006        dir="`$DIRNAME "$path"`"
55007        base="`$BASENAME "$path"`"
55008        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55009      fi
55010    fi
55011  fi
55012
55013
55014    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55016$as_echo_n "checking for freetype includes... " >&6; }
55017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55018$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55019    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55020    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55021$as_echo_n "checking for freetype libraries... " >&6; }
55022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55023$as_echo "$FREETYPE_LIB_PATH" >&6; }
55024  fi
55025
55026              fi
55027            fi
55028          fi
55029        else
55030          FREETYPE_BASE_DIR="$SYSROOT/usr"
55031
55032  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55033  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55034  METHOD="well-known location"
55035
55036  # Let's start with an optimistic view of the world :-)
55037  FOUND_FREETYPE=yes
55038
55039  # First look for the canonical freetype main include file ft2build.h.
55040  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55041    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55042    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55043    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55044      # Fail.
55045      FOUND_FREETYPE=no
55046    fi
55047  fi
55048
55049  if test "x$FOUND_FREETYPE" = xyes; then
55050    # Include file found, let's continue the sanity check.
55051    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55052$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55053
55054    # Reset to default value
55055    FREETYPE_BASE_NAME=freetype
55056    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55057    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55058      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55059          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55060        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55061        # for the .6 version explicitly.
55062        FREETYPE_BASE_NAME=freetype.6
55063        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55064        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55065$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55066      else
55067        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55068$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55069        FOUND_FREETYPE=no
55070      fi
55071    else
55072      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55073        # On Windows, we will need both .lib and .dll file.
55074        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55075          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55076$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55077          FOUND_FREETYPE=no
55078        fi
55079      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55080          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55081        # Found lib in isa dir, use that instead.
55082        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55083        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55084$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55085      fi
55086    fi
55087  fi
55088
55089  if test "x$FOUND_FREETYPE" = xyes; then
55090
55091  # Only process if variable expands to non-empty
55092
55093  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55094    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55095
55096  # Input might be given as Windows format, start by converting to
55097  # unix format.
55098  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55099  new_path=`$CYGPATH -u "$path"`
55100
55101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55104  # "foo.exe" is OK but "foo" is an error.
55105  #
55106  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55107  # It is also a way to make sure we got the proper file name for the real test later on.
55108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55109  if test "x$test_shortpath" = x; then
55110    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55111$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55112    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55113  fi
55114
55115  # Call helper function which possibly converts this using DOS-style short mode.
55116  # If so, the updated path is stored in $new_path.
55117
55118  input_path="$new_path"
55119  # Check if we need to convert this using DOS-style short mode. If the path
55120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55121  # take no chances and rewrite it.
55122  # Note: m4 eats our [], so we need to use [ and ] instead.
55123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55124  if test "x$has_forbidden_chars" != x; then
55125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55126    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55127    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55128    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55129      # Going to short mode and back again did indeed matter. Since short mode is
55130      # case insensitive, let's make it lowercase to improve readability.
55131      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55132      # Now convert it back to Unix-style (cygpath)
55133      input_path=`$CYGPATH -u "$shortmode_path"`
55134      new_path="$input_path"
55135    fi
55136  fi
55137
55138  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55139  if test "x$test_cygdrive_prefix" = x; then
55140    # As a simple fix, exclude /usr/bin since it's not a real path.
55141    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55142      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55143      # a path prefixed by /cygdrive for fixpath to work.
55144      new_path="$CYGWIN_ROOT_PATH$input_path"
55145    fi
55146  fi
55147
55148
55149  if test "x$path" != "x$new_path"; then
55150    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55152$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55153  fi
55154
55155    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55156
55157  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55158  has_colon=`$ECHO $path | $GREP ^.:`
55159  new_path="$path"
55160  if test "x$has_colon" = x; then
55161    # Not in mixed or Windows style, start by that.
55162    new_path=`cmd //c echo $path`
55163  fi
55164
55165
55166  input_path="$new_path"
55167  # Check if we need to convert this using DOS-style short mode. If the path
55168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55169  # take no chances and rewrite it.
55170  # Note: m4 eats our [], so we need to use [ and ] instead.
55171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55172  if test "x$has_forbidden_chars" != x; then
55173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55175  fi
55176
55177
55178  windows_path="$new_path"
55179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55180    unix_path=`$CYGPATH -u "$windows_path"`
55181    new_path="$unix_path"
55182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55184    new_path="$unix_path"
55185  fi
55186
55187  if test "x$path" != "x$new_path"; then
55188    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55190$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55191  fi
55192
55193  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55194  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55195
55196    else
55197      # We're on a unix platform. Hooray! :)
55198      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55199      has_space=`$ECHO "$path" | $GREP " "`
55200      if test "x$has_space" != x; then
55201        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55202$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55203        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55204      fi
55205
55206      # Use eval to expand a potential ~
55207      eval path="$path"
55208      if test ! -f "$path" && test ! -d "$path"; then
55209        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55210      fi
55211
55212      if test -d "$path"; then
55213        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55214      else
55215        dir="`$DIRNAME "$path"`"
55216        base="`$BASENAME "$path"`"
55217        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55218      fi
55219    fi
55220  fi
55221
55222
55223  # Only process if variable expands to non-empty
55224
55225  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55226    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55227
55228  # Input might be given as Windows format, start by converting to
55229  # unix format.
55230  path="$POTENTIAL_FREETYPE_LIB_PATH"
55231  new_path=`$CYGPATH -u "$path"`
55232
55233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55236  # "foo.exe" is OK but "foo" is an error.
55237  #
55238  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55239  # It is also a way to make sure we got the proper file name for the real test later on.
55240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55241  if test "x$test_shortpath" = x; then
55242    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55243$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55244    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55245  fi
55246
55247  # Call helper function which possibly converts this using DOS-style short mode.
55248  # If so, the updated path is stored in $new_path.
55249
55250  input_path="$new_path"
55251  # Check if we need to convert this using DOS-style short mode. If the path
55252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55253  # take no chances and rewrite it.
55254  # Note: m4 eats our [], so we need to use [ and ] instead.
55255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55256  if test "x$has_forbidden_chars" != x; then
55257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55258    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55259    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55260    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55261      # Going to short mode and back again did indeed matter. Since short mode is
55262      # case insensitive, let's make it lowercase to improve readability.
55263      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55264      # Now convert it back to Unix-style (cygpath)
55265      input_path=`$CYGPATH -u "$shortmode_path"`
55266      new_path="$input_path"
55267    fi
55268  fi
55269
55270  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55271  if test "x$test_cygdrive_prefix" = x; then
55272    # As a simple fix, exclude /usr/bin since it's not a real path.
55273    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55274      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55275      # a path prefixed by /cygdrive for fixpath to work.
55276      new_path="$CYGWIN_ROOT_PATH$input_path"
55277    fi
55278  fi
55279
55280
55281  if test "x$path" != "x$new_path"; then
55282    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55284$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55285  fi
55286
55287    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55288
55289  path="$POTENTIAL_FREETYPE_LIB_PATH"
55290  has_colon=`$ECHO $path | $GREP ^.:`
55291  new_path="$path"
55292  if test "x$has_colon" = x; then
55293    # Not in mixed or Windows style, start by that.
55294    new_path=`cmd //c echo $path`
55295  fi
55296
55297
55298  input_path="$new_path"
55299  # Check if we need to convert this using DOS-style short mode. If the path
55300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55301  # take no chances and rewrite it.
55302  # Note: m4 eats our [], so we need to use [ and ] instead.
55303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55304  if test "x$has_forbidden_chars" != x; then
55305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55307  fi
55308
55309
55310  windows_path="$new_path"
55311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55312    unix_path=`$CYGPATH -u "$windows_path"`
55313    new_path="$unix_path"
55314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55316    new_path="$unix_path"
55317  fi
55318
55319  if test "x$path" != "x$new_path"; then
55320    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55322$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55323  fi
55324
55325  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55326  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55327
55328    else
55329      # We're on a unix platform. Hooray! :)
55330      path="$POTENTIAL_FREETYPE_LIB_PATH"
55331      has_space=`$ECHO "$path" | $GREP " "`
55332      if test "x$has_space" != x; then
55333        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55334$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55335        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55336      fi
55337
55338      # Use eval to expand a potential ~
55339      eval path="$path"
55340      if test ! -f "$path" && test ! -d "$path"; then
55341        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55342      fi
55343
55344      if test -d "$path"; then
55345        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55346      else
55347        dir="`$DIRNAME "$path"`"
55348        base="`$BASENAME "$path"`"
55349        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55350      fi
55351    fi
55352  fi
55353
55354
55355    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55356    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55357$as_echo_n "checking for freetype includes... " >&6; }
55358    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55359$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55360    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55362$as_echo_n "checking for freetype libraries... " >&6; }
55363    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55364$as_echo "$FREETYPE_LIB_PATH" >&6; }
55365  fi
55366
55367
55368          if test "x$FOUND_FREETYPE" != xyes; then
55369            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
55370
55371  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55372  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55373  METHOD="well-known location"
55374
55375  # Let's start with an optimistic view of the world :-)
55376  FOUND_FREETYPE=yes
55377
55378  # First look for the canonical freetype main include file ft2build.h.
55379  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55380    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55381    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55382    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55383      # Fail.
55384      FOUND_FREETYPE=no
55385    fi
55386  fi
55387
55388  if test "x$FOUND_FREETYPE" = xyes; then
55389    # Include file found, let's continue the sanity check.
55390    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55391$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55392
55393    # Reset to default value
55394    FREETYPE_BASE_NAME=freetype
55395    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55396    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55397      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55398          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55399        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55400        # for the .6 version explicitly.
55401        FREETYPE_BASE_NAME=freetype.6
55402        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55403        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55404$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55405      else
55406        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55407$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55408        FOUND_FREETYPE=no
55409      fi
55410    else
55411      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55412        # On Windows, we will need both .lib and .dll file.
55413        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55414          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55415$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55416          FOUND_FREETYPE=no
55417        fi
55418      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55419          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55420        # Found lib in isa dir, use that instead.
55421        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55422        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55423$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55424      fi
55425    fi
55426  fi
55427
55428  if test "x$FOUND_FREETYPE" = xyes; then
55429
55430  # Only process if variable expands to non-empty
55431
55432  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55433    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55434
55435  # Input might be given as Windows format, start by converting to
55436  # unix format.
55437  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55438  new_path=`$CYGPATH -u "$path"`
55439
55440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55443  # "foo.exe" is OK but "foo" is an error.
55444  #
55445  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55446  # It is also a way to make sure we got the proper file name for the real test later on.
55447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55448  if test "x$test_shortpath" = x; then
55449    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55450$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55451    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55452  fi
55453
55454  # Call helper function which possibly converts this using DOS-style short mode.
55455  # If so, the updated path is stored in $new_path.
55456
55457  input_path="$new_path"
55458  # Check if we need to convert this using DOS-style short mode. If the path
55459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55460  # take no chances and rewrite it.
55461  # Note: m4 eats our [], so we need to use [ and ] instead.
55462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55463  if test "x$has_forbidden_chars" != x; then
55464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55465    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55466    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55467    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55468      # Going to short mode and back again did indeed matter. Since short mode is
55469      # case insensitive, let's make it lowercase to improve readability.
55470      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55471      # Now convert it back to Unix-style (cygpath)
55472      input_path=`$CYGPATH -u "$shortmode_path"`
55473      new_path="$input_path"
55474    fi
55475  fi
55476
55477  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55478  if test "x$test_cygdrive_prefix" = x; then
55479    # As a simple fix, exclude /usr/bin since it's not a real path.
55480    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55481      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55482      # a path prefixed by /cygdrive for fixpath to work.
55483      new_path="$CYGWIN_ROOT_PATH$input_path"
55484    fi
55485  fi
55486
55487
55488  if test "x$path" != "x$new_path"; then
55489    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55491$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55492  fi
55493
55494    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55495
55496  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55497  has_colon=`$ECHO $path | $GREP ^.:`
55498  new_path="$path"
55499  if test "x$has_colon" = x; then
55500    # Not in mixed or Windows style, start by that.
55501    new_path=`cmd //c echo $path`
55502  fi
55503
55504
55505  input_path="$new_path"
55506  # Check if we need to convert this using DOS-style short mode. If the path
55507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55508  # take no chances and rewrite it.
55509  # Note: m4 eats our [], so we need to use [ and ] instead.
55510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55511  if test "x$has_forbidden_chars" != x; then
55512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55514  fi
55515
55516
55517  windows_path="$new_path"
55518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55519    unix_path=`$CYGPATH -u "$windows_path"`
55520    new_path="$unix_path"
55521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55523    new_path="$unix_path"
55524  fi
55525
55526  if test "x$path" != "x$new_path"; then
55527    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55529$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55530  fi
55531
55532  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55533  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55534
55535    else
55536      # We're on a unix platform. Hooray! :)
55537      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55538      has_space=`$ECHO "$path" | $GREP " "`
55539      if test "x$has_space" != x; then
55540        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55541$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55542        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55543      fi
55544
55545      # Use eval to expand a potential ~
55546      eval path="$path"
55547      if test ! -f "$path" && test ! -d "$path"; then
55548        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55549      fi
55550
55551      if test -d "$path"; then
55552        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55553      else
55554        dir="`$DIRNAME "$path"`"
55555        base="`$BASENAME "$path"`"
55556        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55557      fi
55558    fi
55559  fi
55560
55561
55562  # Only process if variable expands to non-empty
55563
55564  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55565    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55566
55567  # Input might be given as Windows format, start by converting to
55568  # unix format.
55569  path="$POTENTIAL_FREETYPE_LIB_PATH"
55570  new_path=`$CYGPATH -u "$path"`
55571
55572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55575  # "foo.exe" is OK but "foo" is an error.
55576  #
55577  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55578  # It is also a way to make sure we got the proper file name for the real test later on.
55579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55580  if test "x$test_shortpath" = x; then
55581    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55582$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55583    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55584  fi
55585
55586  # Call helper function which possibly converts this using DOS-style short mode.
55587  # If so, the updated path is stored in $new_path.
55588
55589  input_path="$new_path"
55590  # Check if we need to convert this using DOS-style short mode. If the path
55591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55592  # take no chances and rewrite it.
55593  # Note: m4 eats our [], so we need to use [ and ] instead.
55594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55595  if test "x$has_forbidden_chars" != x; then
55596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55597    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55598    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55599    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55600      # Going to short mode and back again did indeed matter. Since short mode is
55601      # case insensitive, let's make it lowercase to improve readability.
55602      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55603      # Now convert it back to Unix-style (cygpath)
55604      input_path=`$CYGPATH -u "$shortmode_path"`
55605      new_path="$input_path"
55606    fi
55607  fi
55608
55609  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55610  if test "x$test_cygdrive_prefix" = x; then
55611    # As a simple fix, exclude /usr/bin since it's not a real path.
55612    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55613      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55614      # a path prefixed by /cygdrive for fixpath to work.
55615      new_path="$CYGWIN_ROOT_PATH$input_path"
55616    fi
55617  fi
55618
55619
55620  if test "x$path" != "x$new_path"; then
55621    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55623$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55624  fi
55625
55626    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55627
55628  path="$POTENTIAL_FREETYPE_LIB_PATH"
55629  has_colon=`$ECHO $path | $GREP ^.:`
55630  new_path="$path"
55631  if test "x$has_colon" = x; then
55632    # Not in mixed or Windows style, start by that.
55633    new_path=`cmd //c echo $path`
55634  fi
55635
55636
55637  input_path="$new_path"
55638  # Check if we need to convert this using DOS-style short mode. If the path
55639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55640  # take no chances and rewrite it.
55641  # Note: m4 eats our [], so we need to use [ and ] instead.
55642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55643  if test "x$has_forbidden_chars" != x; then
55644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55646  fi
55647
55648
55649  windows_path="$new_path"
55650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55651    unix_path=`$CYGPATH -u "$windows_path"`
55652    new_path="$unix_path"
55653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55655    new_path="$unix_path"
55656  fi
55657
55658  if test "x$path" != "x$new_path"; then
55659    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55661$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55662  fi
55663
55664  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55665  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55666
55667    else
55668      # We're on a unix platform. Hooray! :)
55669      path="$POTENTIAL_FREETYPE_LIB_PATH"
55670      has_space=`$ECHO "$path" | $GREP " "`
55671      if test "x$has_space" != x; then
55672        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55673$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55674        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55675      fi
55676
55677      # Use eval to expand a potential ~
55678      eval path="$path"
55679      if test ! -f "$path" && test ! -d "$path"; then
55680        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55681      fi
55682
55683      if test -d "$path"; then
55684        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55685      else
55686        dir="`$DIRNAME "$path"`"
55687        base="`$BASENAME "$path"`"
55688        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55689      fi
55690    fi
55691  fi
55692
55693
55694    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55695    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55696$as_echo_n "checking for freetype includes... " >&6; }
55697    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55698$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55699    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55700    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55701$as_echo_n "checking for freetype libraries... " >&6; }
55702    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55703$as_echo "$FREETYPE_LIB_PATH" >&6; }
55704  fi
55705
55706          fi
55707
55708          if test "x$FOUND_FREETYPE" != xyes; then
55709            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
55710
55711  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55712  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55713  METHOD="well-known location"
55714
55715  # Let's start with an optimistic view of the world :-)
55716  FOUND_FREETYPE=yes
55717
55718  # First look for the canonical freetype main include file ft2build.h.
55719  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55720    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55721    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55722    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55723      # Fail.
55724      FOUND_FREETYPE=no
55725    fi
55726  fi
55727
55728  if test "x$FOUND_FREETYPE" = xyes; then
55729    # Include file found, let's continue the sanity check.
55730    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55731$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55732
55733    # Reset to default value
55734    FREETYPE_BASE_NAME=freetype
55735    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55736    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55737      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55738          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55739        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55740        # for the .6 version explicitly.
55741        FREETYPE_BASE_NAME=freetype.6
55742        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55743        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55744$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55745      else
55746        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55747$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55748        FOUND_FREETYPE=no
55749      fi
55750    else
55751      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55752        # On Windows, we will need both .lib and .dll file.
55753        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55754          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55755$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55756          FOUND_FREETYPE=no
55757        fi
55758      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55759          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55760        # Found lib in isa dir, use that instead.
55761        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55762        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55763$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55764      fi
55765    fi
55766  fi
55767
55768  if test "x$FOUND_FREETYPE" = xyes; then
55769
55770  # Only process if variable expands to non-empty
55771
55772  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55774
55775  # Input might be given as Windows format, start by converting to
55776  # unix format.
55777  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55778  new_path=`$CYGPATH -u "$path"`
55779
55780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55783  # "foo.exe" is OK but "foo" is an error.
55784  #
55785  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55786  # It is also a way to make sure we got the proper file name for the real test later on.
55787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55788  if test "x$test_shortpath" = x; then
55789    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55790$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55791    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55792  fi
55793
55794  # Call helper function which possibly converts this using DOS-style short mode.
55795  # If so, the updated path is stored in $new_path.
55796
55797  input_path="$new_path"
55798  # Check if we need to convert this using DOS-style short mode. If the path
55799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55800  # take no chances and rewrite it.
55801  # Note: m4 eats our [], so we need to use [ and ] instead.
55802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55803  if test "x$has_forbidden_chars" != x; then
55804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55808      # Going to short mode and back again did indeed matter. Since short mode is
55809      # case insensitive, let's make it lowercase to improve readability.
55810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55811      # Now convert it back to Unix-style (cygpath)
55812      input_path=`$CYGPATH -u "$shortmode_path"`
55813      new_path="$input_path"
55814    fi
55815  fi
55816
55817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55818  if test "x$test_cygdrive_prefix" = x; then
55819    # As a simple fix, exclude /usr/bin since it's not a real path.
55820    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55822      # a path prefixed by /cygdrive for fixpath to work.
55823      new_path="$CYGWIN_ROOT_PATH$input_path"
55824    fi
55825  fi
55826
55827
55828  if test "x$path" != "x$new_path"; then
55829    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55831$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55832  fi
55833
55834    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55835
55836  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55837  has_colon=`$ECHO $path | $GREP ^.:`
55838  new_path="$path"
55839  if test "x$has_colon" = x; then
55840    # Not in mixed or Windows style, start by that.
55841    new_path=`cmd //c echo $path`
55842  fi
55843
55844
55845  input_path="$new_path"
55846  # Check if we need to convert this using DOS-style short mode. If the path
55847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55848  # take no chances and rewrite it.
55849  # Note: m4 eats our [], so we need to use [ and ] instead.
55850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55851  if test "x$has_forbidden_chars" != x; then
55852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55854  fi
55855
55856
55857  windows_path="$new_path"
55858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55859    unix_path=`$CYGPATH -u "$windows_path"`
55860    new_path="$unix_path"
55861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55863    new_path="$unix_path"
55864  fi
55865
55866  if test "x$path" != "x$new_path"; then
55867    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55869$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55870  fi
55871
55872  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55873  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55874
55875    else
55876      # We're on a unix platform. Hooray! :)
55877      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55878      has_space=`$ECHO "$path" | $GREP " "`
55879      if test "x$has_space" != x; then
55880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55881$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55882        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55883      fi
55884
55885      # Use eval to expand a potential ~
55886      eval path="$path"
55887      if test ! -f "$path" && test ! -d "$path"; then
55888        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55889      fi
55890
55891      if test -d "$path"; then
55892        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55893      else
55894        dir="`$DIRNAME "$path"`"
55895        base="`$BASENAME "$path"`"
55896        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55897      fi
55898    fi
55899  fi
55900
55901
55902  # Only process if variable expands to non-empty
55903
55904  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55905    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55906
55907  # Input might be given as Windows format, start by converting to
55908  # unix format.
55909  path="$POTENTIAL_FREETYPE_LIB_PATH"
55910  new_path=`$CYGPATH -u "$path"`
55911
55912  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55913  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55914  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55915  # "foo.exe" is OK but "foo" is an error.
55916  #
55917  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55918  # It is also a way to make sure we got the proper file name for the real test later on.
55919  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55920  if test "x$test_shortpath" = x; then
55921    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55922$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55923    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55924  fi
55925
55926  # Call helper function which possibly converts this using DOS-style short mode.
55927  # If so, the updated path is stored in $new_path.
55928
55929  input_path="$new_path"
55930  # Check if we need to convert this using DOS-style short mode. If the path
55931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55932  # take no chances and rewrite it.
55933  # Note: m4 eats our [], so we need to use [ and ] instead.
55934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55935  if test "x$has_forbidden_chars" != x; then
55936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55940      # Going to short mode and back again did indeed matter. Since short mode is
55941      # case insensitive, let's make it lowercase to improve readability.
55942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55943      # Now convert it back to Unix-style (cygpath)
55944      input_path=`$CYGPATH -u "$shortmode_path"`
55945      new_path="$input_path"
55946    fi
55947  fi
55948
55949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55950  if test "x$test_cygdrive_prefix" = x; then
55951    # As a simple fix, exclude /usr/bin since it's not a real path.
55952    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55954      # a path prefixed by /cygdrive for fixpath to work.
55955      new_path="$CYGWIN_ROOT_PATH$input_path"
55956    fi
55957  fi
55958
55959
55960  if test "x$path" != "x$new_path"; then
55961    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55963$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55964  fi
55965
55966    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55967
55968  path="$POTENTIAL_FREETYPE_LIB_PATH"
55969  has_colon=`$ECHO $path | $GREP ^.:`
55970  new_path="$path"
55971  if test "x$has_colon" = x; then
55972    # Not in mixed or Windows style, start by that.
55973    new_path=`cmd //c echo $path`
55974  fi
55975
55976
55977  input_path="$new_path"
55978  # Check if we need to convert this using DOS-style short mode. If the path
55979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55980  # take no chances and rewrite it.
55981  # Note: m4 eats our [], so we need to use [ and ] instead.
55982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55983  if test "x$has_forbidden_chars" != x; then
55984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55986  fi
55987
55988
55989  windows_path="$new_path"
55990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55991    unix_path=`$CYGPATH -u "$windows_path"`
55992    new_path="$unix_path"
55993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55995    new_path="$unix_path"
55996  fi
55997
55998  if test "x$path" != "x$new_path"; then
55999    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56001$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56002  fi
56003
56004  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56005  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56006
56007    else
56008      # We're on a unix platform. Hooray! :)
56009      path="$POTENTIAL_FREETYPE_LIB_PATH"
56010      has_space=`$ECHO "$path" | $GREP " "`
56011      if test "x$has_space" != x; then
56012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56013$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56014        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56015      fi
56016
56017      # Use eval to expand a potential ~
56018      eval path="$path"
56019      if test ! -f "$path" && test ! -d "$path"; then
56020        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56021      fi
56022
56023      if test -d "$path"; then
56024        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56025      else
56026        dir="`$DIRNAME "$path"`"
56027        base="`$BASENAME "$path"`"
56028        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56029      fi
56030    fi
56031  fi
56032
56033
56034    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56035    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56036$as_echo_n "checking for freetype includes... " >&6; }
56037    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56038$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56039    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56040    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56041$as_echo_n "checking for freetype libraries... " >&6; }
56042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56043$as_echo "$FREETYPE_LIB_PATH" >&6; }
56044  fi
56045
56046          fi
56047
56048          if test "x$FOUND_FREETYPE" != xyes; then
56049            FREETYPE_BASE_DIR="$SYSROOT/usr"
56050            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56051
56052  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56053  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
56054  METHOD="well-known location"
56055
56056  # Let's start with an optimistic view of the world :-)
56057  FOUND_FREETYPE=yes
56058
56059  # First look for the canonical freetype main include file ft2build.h.
56060  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56061    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56062    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56063    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56064      # Fail.
56065      FOUND_FREETYPE=no
56066    fi
56067  fi
56068
56069  if test "x$FOUND_FREETYPE" = xyes; then
56070    # Include file found, let's continue the sanity check.
56071    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56072$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56073
56074    # Reset to default value
56075    FREETYPE_BASE_NAME=freetype
56076    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56077    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56078      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56079          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56080        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56081        # for the .6 version explicitly.
56082        FREETYPE_BASE_NAME=freetype.6
56083        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56084        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56085$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56086      else
56087        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56088$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56089        FOUND_FREETYPE=no
56090      fi
56091    else
56092      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56093        # On Windows, we will need both .lib and .dll file.
56094        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56095          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56096$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56097          FOUND_FREETYPE=no
56098        fi
56099      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56100          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56101        # Found lib in isa dir, use that instead.
56102        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56103        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56104$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56105      fi
56106    fi
56107  fi
56108
56109  if test "x$FOUND_FREETYPE" = xyes; then
56110
56111  # Only process if variable expands to non-empty
56112
56113  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56114    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56115
56116  # Input might be given as Windows format, start by converting to
56117  # unix format.
56118  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56119  new_path=`$CYGPATH -u "$path"`
56120
56121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56124  # "foo.exe" is OK but "foo" is an error.
56125  #
56126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56127  # It is also a way to make sure we got the proper file name for the real test later on.
56128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56129  if test "x$test_shortpath" = x; then
56130    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56131$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56132    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56133  fi
56134
56135  # Call helper function which possibly converts this using DOS-style short mode.
56136  # If so, the updated path is stored in $new_path.
56137
56138  input_path="$new_path"
56139  # Check if we need to convert this using DOS-style short mode. If the path
56140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56141  # take no chances and rewrite it.
56142  # Note: m4 eats our [], so we need to use [ and ] instead.
56143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56144  if test "x$has_forbidden_chars" != x; then
56145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56149      # Going to short mode and back again did indeed matter. Since short mode is
56150      # case insensitive, let's make it lowercase to improve readability.
56151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56152      # Now convert it back to Unix-style (cygpath)
56153      input_path=`$CYGPATH -u "$shortmode_path"`
56154      new_path="$input_path"
56155    fi
56156  fi
56157
56158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56159  if test "x$test_cygdrive_prefix" = x; then
56160    # As a simple fix, exclude /usr/bin since it's not a real path.
56161    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56163      # a path prefixed by /cygdrive for fixpath to work.
56164      new_path="$CYGWIN_ROOT_PATH$input_path"
56165    fi
56166  fi
56167
56168
56169  if test "x$path" != "x$new_path"; then
56170    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56172$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56173  fi
56174
56175    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56176
56177  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56178  has_colon=`$ECHO $path | $GREP ^.:`
56179  new_path="$path"
56180  if test "x$has_colon" = x; then
56181    # Not in mixed or Windows style, start by that.
56182    new_path=`cmd //c echo $path`
56183  fi
56184
56185
56186  input_path="$new_path"
56187  # Check if we need to convert this using DOS-style short mode. If the path
56188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56189  # take no chances and rewrite it.
56190  # Note: m4 eats our [], so we need to use [ and ] instead.
56191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56192  if test "x$has_forbidden_chars" != x; then
56193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56195  fi
56196
56197
56198  windows_path="$new_path"
56199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56200    unix_path=`$CYGPATH -u "$windows_path"`
56201    new_path="$unix_path"
56202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56204    new_path="$unix_path"
56205  fi
56206
56207  if test "x$path" != "x$new_path"; then
56208    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56210$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56211  fi
56212
56213  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56214  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56215
56216    else
56217      # We're on a unix platform. Hooray! :)
56218      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56219      has_space=`$ECHO "$path" | $GREP " "`
56220      if test "x$has_space" != x; then
56221        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56222$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56223        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56224      fi
56225
56226      # Use eval to expand a potential ~
56227      eval path="$path"
56228      if test ! -f "$path" && test ! -d "$path"; then
56229        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56230      fi
56231
56232      if test -d "$path"; then
56233        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56234      else
56235        dir="`$DIRNAME "$path"`"
56236        base="`$BASENAME "$path"`"
56237        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56238      fi
56239    fi
56240  fi
56241
56242
56243  # Only process if variable expands to non-empty
56244
56245  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56247
56248  # Input might be given as Windows format, start by converting to
56249  # unix format.
56250  path="$POTENTIAL_FREETYPE_LIB_PATH"
56251  new_path=`$CYGPATH -u "$path"`
56252
56253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56256  # "foo.exe" is OK but "foo" is an error.
56257  #
56258  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56259  # It is also a way to make sure we got the proper file name for the real test later on.
56260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56261  if test "x$test_shortpath" = x; then
56262    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56263$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56264    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56265  fi
56266
56267  # Call helper function which possibly converts this using DOS-style short mode.
56268  # If so, the updated path is stored in $new_path.
56269
56270  input_path="$new_path"
56271  # Check if we need to convert this using DOS-style short mode. If the path
56272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56273  # take no chances and rewrite it.
56274  # Note: m4 eats our [], so we need to use [ and ] instead.
56275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56276  if test "x$has_forbidden_chars" != x; then
56277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56281      # Going to short mode and back again did indeed matter. Since short mode is
56282      # case insensitive, let's make it lowercase to improve readability.
56283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56284      # Now convert it back to Unix-style (cygpath)
56285      input_path=`$CYGPATH -u "$shortmode_path"`
56286      new_path="$input_path"
56287    fi
56288  fi
56289
56290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56291  if test "x$test_cygdrive_prefix" = x; then
56292    # As a simple fix, exclude /usr/bin since it's not a real path.
56293    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56295      # a path prefixed by /cygdrive for fixpath to work.
56296      new_path="$CYGWIN_ROOT_PATH$input_path"
56297    fi
56298  fi
56299
56300
56301  if test "x$path" != "x$new_path"; then
56302    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56304$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56305  fi
56306
56307    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56308
56309  path="$POTENTIAL_FREETYPE_LIB_PATH"
56310  has_colon=`$ECHO $path | $GREP ^.:`
56311  new_path="$path"
56312  if test "x$has_colon" = x; then
56313    # Not in mixed or Windows style, start by that.
56314    new_path=`cmd //c echo $path`
56315  fi
56316
56317
56318  input_path="$new_path"
56319  # Check if we need to convert this using DOS-style short mode. If the path
56320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56321  # take no chances and rewrite it.
56322  # Note: m4 eats our [], so we need to use [ and ] instead.
56323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56324  if test "x$has_forbidden_chars" != x; then
56325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56327  fi
56328
56329
56330  windows_path="$new_path"
56331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56332    unix_path=`$CYGPATH -u "$windows_path"`
56333    new_path="$unix_path"
56334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56336    new_path="$unix_path"
56337  fi
56338
56339  if test "x$path" != "x$new_path"; then
56340    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56342$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56343  fi
56344
56345  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56346  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56347
56348    else
56349      # We're on a unix platform. Hooray! :)
56350      path="$POTENTIAL_FREETYPE_LIB_PATH"
56351      has_space=`$ECHO "$path" | $GREP " "`
56352      if test "x$has_space" != x; then
56353        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56354$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56355        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56356      fi
56357
56358      # Use eval to expand a potential ~
56359      eval path="$path"
56360      if test ! -f "$path" && test ! -d "$path"; then
56361        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56362      fi
56363
56364      if test -d "$path"; then
56365        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56366      else
56367        dir="`$DIRNAME "$path"`"
56368        base="`$BASENAME "$path"`"
56369        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56370      fi
56371    fi
56372  fi
56373
56374
56375    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56376    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56377$as_echo_n "checking for freetype includes... " >&6; }
56378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56379$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56380    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56381    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56382$as_echo_n "checking for freetype libraries... " >&6; }
56383    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56384$as_echo "$FREETYPE_LIB_PATH" >&6; }
56385  fi
56386
56387            else
56388
56389  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56390  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
56391  METHOD="well-known location"
56392
56393  # Let's start with an optimistic view of the world :-)
56394  FOUND_FREETYPE=yes
56395
56396  # First look for the canonical freetype main include file ft2build.h.
56397  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56398    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56399    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56400    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56401      # Fail.
56402      FOUND_FREETYPE=no
56403    fi
56404  fi
56405
56406  if test "x$FOUND_FREETYPE" = xyes; then
56407    # Include file found, let's continue the sanity check.
56408    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56409$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56410
56411    # Reset to default value
56412    FREETYPE_BASE_NAME=freetype
56413    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56414    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56415      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56416          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56417        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56418        # for the .6 version explicitly.
56419        FREETYPE_BASE_NAME=freetype.6
56420        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56421        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56422$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56423      else
56424        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56425$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56426        FOUND_FREETYPE=no
56427      fi
56428    else
56429      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56430        # On Windows, we will need both .lib and .dll file.
56431        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56432          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56433$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56434          FOUND_FREETYPE=no
56435        fi
56436      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56437          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56438        # Found lib in isa dir, use that instead.
56439        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56440        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56441$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56442      fi
56443    fi
56444  fi
56445
56446  if test "x$FOUND_FREETYPE" = xyes; then
56447
56448  # Only process if variable expands to non-empty
56449
56450  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56451    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56452
56453  # Input might be given as Windows format, start by converting to
56454  # unix format.
56455  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56456  new_path=`$CYGPATH -u "$path"`
56457
56458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56461  # "foo.exe" is OK but "foo" is an error.
56462  #
56463  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56464  # It is also a way to make sure we got the proper file name for the real test later on.
56465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56466  if test "x$test_shortpath" = x; then
56467    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56468$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56469    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56470  fi
56471
56472  # Call helper function which possibly converts this using DOS-style short mode.
56473  # If so, the updated path is stored in $new_path.
56474
56475  input_path="$new_path"
56476  # Check if we need to convert this using DOS-style short mode. If the path
56477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56478  # take no chances and rewrite it.
56479  # Note: m4 eats our [], so we need to use [ and ] instead.
56480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56481  if test "x$has_forbidden_chars" != x; then
56482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56486      # Going to short mode and back again did indeed matter. Since short mode is
56487      # case insensitive, let's make it lowercase to improve readability.
56488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56489      # Now convert it back to Unix-style (cygpath)
56490      input_path=`$CYGPATH -u "$shortmode_path"`
56491      new_path="$input_path"
56492    fi
56493  fi
56494
56495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56496  if test "x$test_cygdrive_prefix" = x; then
56497    # As a simple fix, exclude /usr/bin since it's not a real path.
56498    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56500      # a path prefixed by /cygdrive for fixpath to work.
56501      new_path="$CYGWIN_ROOT_PATH$input_path"
56502    fi
56503  fi
56504
56505
56506  if test "x$path" != "x$new_path"; then
56507    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56509$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56510  fi
56511
56512    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56513
56514  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56515  has_colon=`$ECHO $path | $GREP ^.:`
56516  new_path="$path"
56517  if test "x$has_colon" = x; then
56518    # Not in mixed or Windows style, start by that.
56519    new_path=`cmd //c echo $path`
56520  fi
56521
56522
56523  input_path="$new_path"
56524  # Check if we need to convert this using DOS-style short mode. If the path
56525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56526  # take no chances and rewrite it.
56527  # Note: m4 eats our [], so we need to use [ and ] instead.
56528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56529  if test "x$has_forbidden_chars" != x; then
56530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56532  fi
56533
56534
56535  windows_path="$new_path"
56536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56537    unix_path=`$CYGPATH -u "$windows_path"`
56538    new_path="$unix_path"
56539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56541    new_path="$unix_path"
56542  fi
56543
56544  if test "x$path" != "x$new_path"; then
56545    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56547$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56548  fi
56549
56550  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56551  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56552
56553    else
56554      # We're on a unix platform. Hooray! :)
56555      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56556      has_space=`$ECHO "$path" | $GREP " "`
56557      if test "x$has_space" != x; then
56558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56559$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56560        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56561      fi
56562
56563      # Use eval to expand a potential ~
56564      eval path="$path"
56565      if test ! -f "$path" && test ! -d "$path"; then
56566        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56567      fi
56568
56569      if test -d "$path"; then
56570        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56571      else
56572        dir="`$DIRNAME "$path"`"
56573        base="`$BASENAME "$path"`"
56574        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56575      fi
56576    fi
56577  fi
56578
56579
56580  # Only process if variable expands to non-empty
56581
56582  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56583    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56584
56585  # Input might be given as Windows format, start by converting to
56586  # unix format.
56587  path="$POTENTIAL_FREETYPE_LIB_PATH"
56588  new_path=`$CYGPATH -u "$path"`
56589
56590  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56591  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56592  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56593  # "foo.exe" is OK but "foo" is an error.
56594  #
56595  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56596  # It is also a way to make sure we got the proper file name for the real test later on.
56597  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56598  if test "x$test_shortpath" = x; then
56599    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56600$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56601    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56602  fi
56603
56604  # Call helper function which possibly converts this using DOS-style short mode.
56605  # If so, the updated path is stored in $new_path.
56606
56607  input_path="$new_path"
56608  # Check if we need to convert this using DOS-style short mode. If the path
56609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56610  # take no chances and rewrite it.
56611  # Note: m4 eats our [], so we need to use [ and ] instead.
56612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56613  if test "x$has_forbidden_chars" != x; then
56614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56615    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56616    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56617    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56618      # Going to short mode and back again did indeed matter. Since short mode is
56619      # case insensitive, let's make it lowercase to improve readability.
56620      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56621      # Now convert it back to Unix-style (cygpath)
56622      input_path=`$CYGPATH -u "$shortmode_path"`
56623      new_path="$input_path"
56624    fi
56625  fi
56626
56627  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56628  if test "x$test_cygdrive_prefix" = x; then
56629    # As a simple fix, exclude /usr/bin since it's not a real path.
56630    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56631      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56632      # a path prefixed by /cygdrive for fixpath to work.
56633      new_path="$CYGWIN_ROOT_PATH$input_path"
56634    fi
56635  fi
56636
56637
56638  if test "x$path" != "x$new_path"; then
56639    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56641$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56642  fi
56643
56644    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56645
56646  path="$POTENTIAL_FREETYPE_LIB_PATH"
56647  has_colon=`$ECHO $path | $GREP ^.:`
56648  new_path="$path"
56649  if test "x$has_colon" = x; then
56650    # Not in mixed or Windows style, start by that.
56651    new_path=`cmd //c echo $path`
56652  fi
56653
56654
56655  input_path="$new_path"
56656  # Check if we need to convert this using DOS-style short mode. If the path
56657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56658  # take no chances and rewrite it.
56659  # Note: m4 eats our [], so we need to use [ and ] instead.
56660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56661  if test "x$has_forbidden_chars" != x; then
56662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56663    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56664  fi
56665
56666
56667  windows_path="$new_path"
56668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56669    unix_path=`$CYGPATH -u "$windows_path"`
56670    new_path="$unix_path"
56671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56673    new_path="$unix_path"
56674  fi
56675
56676  if test "x$path" != "x$new_path"; then
56677    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56679$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56680  fi
56681
56682  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56683  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56684
56685    else
56686      # We're on a unix platform. Hooray! :)
56687      path="$POTENTIAL_FREETYPE_LIB_PATH"
56688      has_space=`$ECHO "$path" | $GREP " "`
56689      if test "x$has_space" != x; then
56690        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56691$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56692        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56693      fi
56694
56695      # Use eval to expand a potential ~
56696      eval path="$path"
56697      if test ! -f "$path" && test ! -d "$path"; then
56698        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56699      fi
56700
56701      if test -d "$path"; then
56702        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56703      else
56704        dir="`$DIRNAME "$path"`"
56705        base="`$BASENAME "$path"`"
56706        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56707      fi
56708    fi
56709  fi
56710
56711
56712    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56713    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56714$as_echo_n "checking for freetype includes... " >&6; }
56715    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56716$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56717    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56718    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56719$as_echo_n "checking for freetype libraries... " >&6; }
56720    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56721$as_echo "$FREETYPE_LIB_PATH" >&6; }
56722  fi
56723
56724              if test "x$FOUND_FREETYPE" != xyes; then
56725
56726  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56727  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
56728  METHOD="well-known location"
56729
56730  # Let's start with an optimistic view of the world :-)
56731  FOUND_FREETYPE=yes
56732
56733  # First look for the canonical freetype main include file ft2build.h.
56734  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56735    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56736    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56737    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56738      # Fail.
56739      FOUND_FREETYPE=no
56740    fi
56741  fi
56742
56743  if test "x$FOUND_FREETYPE" = xyes; then
56744    # Include file found, let's continue the sanity check.
56745    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56746$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56747
56748    # Reset to default value
56749    FREETYPE_BASE_NAME=freetype
56750    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56751    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56752      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56753          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56754        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56755        # for the .6 version explicitly.
56756        FREETYPE_BASE_NAME=freetype.6
56757        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56758        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56759$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56760      else
56761        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56762$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56763        FOUND_FREETYPE=no
56764      fi
56765    else
56766      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56767        # On Windows, we will need both .lib and .dll file.
56768        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56769          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56770$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56771          FOUND_FREETYPE=no
56772        fi
56773      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56774          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56775        # Found lib in isa dir, use that instead.
56776        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56777        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56778$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56779      fi
56780    fi
56781  fi
56782
56783  if test "x$FOUND_FREETYPE" = xyes; then
56784
56785  # Only process if variable expands to non-empty
56786
56787  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56788    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56789
56790  # Input might be given as Windows format, start by converting to
56791  # unix format.
56792  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56793  new_path=`$CYGPATH -u "$path"`
56794
56795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56798  # "foo.exe" is OK but "foo" is an error.
56799  #
56800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56801  # It is also a way to make sure we got the proper file name for the real test later on.
56802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56803  if test "x$test_shortpath" = x; then
56804    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56805$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56806    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56807  fi
56808
56809  # Call helper function which possibly converts this using DOS-style short mode.
56810  # If so, the updated path is stored in $new_path.
56811
56812  input_path="$new_path"
56813  # Check if we need to convert this using DOS-style short mode. If the path
56814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56815  # take no chances and rewrite it.
56816  # Note: m4 eats our [], so we need to use [ and ] instead.
56817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56818  if test "x$has_forbidden_chars" != x; then
56819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56823      # Going to short mode and back again did indeed matter. Since short mode is
56824      # case insensitive, let's make it lowercase to improve readability.
56825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56826      # Now convert it back to Unix-style (cygpath)
56827      input_path=`$CYGPATH -u "$shortmode_path"`
56828      new_path="$input_path"
56829    fi
56830  fi
56831
56832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56833  if test "x$test_cygdrive_prefix" = x; then
56834    # As a simple fix, exclude /usr/bin since it's not a real path.
56835    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56837      # a path prefixed by /cygdrive for fixpath to work.
56838      new_path="$CYGWIN_ROOT_PATH$input_path"
56839    fi
56840  fi
56841
56842
56843  if test "x$path" != "x$new_path"; then
56844    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56846$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56847  fi
56848
56849    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56850
56851  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56852  has_colon=`$ECHO $path | $GREP ^.:`
56853  new_path="$path"
56854  if test "x$has_colon" = x; then
56855    # Not in mixed or Windows style, start by that.
56856    new_path=`cmd //c echo $path`
56857  fi
56858
56859
56860  input_path="$new_path"
56861  # Check if we need to convert this using DOS-style short mode. If the path
56862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56863  # take no chances and rewrite it.
56864  # Note: m4 eats our [], so we need to use [ and ] instead.
56865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56866  if test "x$has_forbidden_chars" != x; then
56867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56869  fi
56870
56871
56872  windows_path="$new_path"
56873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56874    unix_path=`$CYGPATH -u "$windows_path"`
56875    new_path="$unix_path"
56876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56878    new_path="$unix_path"
56879  fi
56880
56881  if test "x$path" != "x$new_path"; then
56882    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56884$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56885  fi
56886
56887  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56888  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56889
56890    else
56891      # We're on a unix platform. Hooray! :)
56892      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56893      has_space=`$ECHO "$path" | $GREP " "`
56894      if test "x$has_space" != x; then
56895        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56896$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56897        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56898      fi
56899
56900      # Use eval to expand a potential ~
56901      eval path="$path"
56902      if test ! -f "$path" && test ! -d "$path"; then
56903        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56904      fi
56905
56906      if test -d "$path"; then
56907        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56908      else
56909        dir="`$DIRNAME "$path"`"
56910        base="`$BASENAME "$path"`"
56911        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56912      fi
56913    fi
56914  fi
56915
56916
56917  # Only process if variable expands to non-empty
56918
56919  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56920    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56921
56922  # Input might be given as Windows format, start by converting to
56923  # unix format.
56924  path="$POTENTIAL_FREETYPE_LIB_PATH"
56925  new_path=`$CYGPATH -u "$path"`
56926
56927  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56928  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56929  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56930  # "foo.exe" is OK but "foo" is an error.
56931  #
56932  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56933  # It is also a way to make sure we got the proper file name for the real test later on.
56934  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56935  if test "x$test_shortpath" = x; then
56936    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56937$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56938    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56939  fi
56940
56941  # Call helper function which possibly converts this using DOS-style short mode.
56942  # If so, the updated path is stored in $new_path.
56943
56944  input_path="$new_path"
56945  # Check if we need to convert this using DOS-style short mode. If the path
56946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56947  # take no chances and rewrite it.
56948  # Note: m4 eats our [], so we need to use [ and ] instead.
56949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56950  if test "x$has_forbidden_chars" != x; then
56951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56952    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56953    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56954    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56955      # Going to short mode and back again did indeed matter. Since short mode is
56956      # case insensitive, let's make it lowercase to improve readability.
56957      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56958      # Now convert it back to Unix-style (cygpath)
56959      input_path=`$CYGPATH -u "$shortmode_path"`
56960      new_path="$input_path"
56961    fi
56962  fi
56963
56964  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56965  if test "x$test_cygdrive_prefix" = x; then
56966    # As a simple fix, exclude /usr/bin since it's not a real path.
56967    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56968      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56969      # a path prefixed by /cygdrive for fixpath to work.
56970      new_path="$CYGWIN_ROOT_PATH$input_path"
56971    fi
56972  fi
56973
56974
56975  if test "x$path" != "x$new_path"; then
56976    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56978$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56979  fi
56980
56981    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56982
56983  path="$POTENTIAL_FREETYPE_LIB_PATH"
56984  has_colon=`$ECHO $path | $GREP ^.:`
56985  new_path="$path"
56986  if test "x$has_colon" = x; then
56987    # Not in mixed or Windows style, start by that.
56988    new_path=`cmd //c echo $path`
56989  fi
56990
56991
56992  input_path="$new_path"
56993  # Check if we need to convert this using DOS-style short mode. If the path
56994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56995  # take no chances and rewrite it.
56996  # Note: m4 eats our [], so we need to use [ and ] instead.
56997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56998  if test "x$has_forbidden_chars" != x; then
56999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57001  fi
57002
57003
57004  windows_path="$new_path"
57005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57006    unix_path=`$CYGPATH -u "$windows_path"`
57007    new_path="$unix_path"
57008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57010    new_path="$unix_path"
57011  fi
57012
57013  if test "x$path" != "x$new_path"; then
57014    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57016$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57017  fi
57018
57019  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57020  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57021
57022    else
57023      # We're on a unix platform. Hooray! :)
57024      path="$POTENTIAL_FREETYPE_LIB_PATH"
57025      has_space=`$ECHO "$path" | $GREP " "`
57026      if test "x$has_space" != x; then
57027        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57028$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57029        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57030      fi
57031
57032      # Use eval to expand a potential ~
57033      eval path="$path"
57034      if test ! -f "$path" && test ! -d "$path"; then
57035        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57036      fi
57037
57038      if test -d "$path"; then
57039        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57040      else
57041        dir="`$DIRNAME "$path"`"
57042        base="`$BASENAME "$path"`"
57043        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57044      fi
57045    fi
57046  fi
57047
57048
57049    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57050    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57051$as_echo_n "checking for freetype includes... " >&6; }
57052    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57053$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57054    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57055    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57056$as_echo_n "checking for freetype libraries... " >&6; }
57057    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57058$as_echo "$FREETYPE_LIB_PATH" >&6; }
57059  fi
57060
57061              fi
57062            fi
57063          fi
57064        fi
57065      fi # end check in well-known locations
57066
57067      if test "x$FOUND_FREETYPE" != xyes; then
57068
57069  # Print a helpful message on how to acquire the necessary build dependency.
57070  # freetype is the help tag: freetype, cups, alsa etc
57071  MISSING_DEPENDENCY=freetype
57072
57073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57074    cygwin_help $MISSING_DEPENDENCY
57075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57076    msys_help $MISSING_DEPENDENCY
57077  else
57078    PKGHANDLER_COMMAND=
57079
57080    case $PKGHANDLER in
57081      apt-get)
57082        apt_help     $MISSING_DEPENDENCY ;;
57083      yum)
57084        yum_help     $MISSING_DEPENDENCY ;;
57085      port)
57086        port_help    $MISSING_DEPENDENCY ;;
57087      pkgutil)
57088        pkgutil_help $MISSING_DEPENDENCY ;;
57089      pkgadd)
57090        pkgadd_help  $MISSING_DEPENDENCY ;;
57091    esac
57092
57093    if test "x$PKGHANDLER_COMMAND" != x; then
57094      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57095    fi
57096  fi
57097
57098        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
57099      fi
57100    fi # end user specified settings
57101
57102    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
57103    if test "x$FREETYPE_CFLAGS" = x; then
57104
57105  # Only process if variable expands to non-empty
57106
57107  if test "x$FREETYPE_INCLUDE_PATH" != x; then
57108    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57109
57110  # Input might be given as Windows format, start by converting to
57111  # unix format.
57112  path="$FREETYPE_INCLUDE_PATH"
57113  new_path=`$CYGPATH -u "$path"`
57114
57115  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57116  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57117  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57118  # "foo.exe" is OK but "foo" is an error.
57119  #
57120  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57121  # It is also a way to make sure we got the proper file name for the real test later on.
57122  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57123  if test "x$test_shortpath" = x; then
57124    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57125$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57126    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
57127  fi
57128
57129  # Call helper function which possibly converts this using DOS-style short mode.
57130  # If so, the updated path is stored in $new_path.
57131
57132  input_path="$new_path"
57133  # Check if we need to convert this using DOS-style short mode. If the path
57134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57135  # take no chances and rewrite it.
57136  # Note: m4 eats our [], so we need to use [ and ] instead.
57137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57138  if test "x$has_forbidden_chars" != x; then
57139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57140    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57141    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57142    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57143      # Going to short mode and back again did indeed matter. Since short mode is
57144      # case insensitive, let's make it lowercase to improve readability.
57145      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57146      # Now convert it back to Unix-style (cygpath)
57147      input_path=`$CYGPATH -u "$shortmode_path"`
57148      new_path="$input_path"
57149    fi
57150  fi
57151
57152  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57153  if test "x$test_cygdrive_prefix" = x; then
57154    # As a simple fix, exclude /usr/bin since it's not a real path.
57155    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57156      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57157      # a path prefixed by /cygdrive for fixpath to work.
57158      new_path="$CYGWIN_ROOT_PATH$input_path"
57159    fi
57160  fi
57161
57162
57163  if test "x$path" != "x$new_path"; then
57164    FREETYPE_INCLUDE_PATH="$new_path"
57165    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57166$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57167  fi
57168
57169    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57170
57171  path="$FREETYPE_INCLUDE_PATH"
57172  has_colon=`$ECHO $path | $GREP ^.:`
57173  new_path="$path"
57174  if test "x$has_colon" = x; then
57175    # Not in mixed or Windows style, start by that.
57176    new_path=`cmd //c echo $path`
57177  fi
57178
57179
57180  input_path="$new_path"
57181  # Check if we need to convert this using DOS-style short mode. If the path
57182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57183  # take no chances and rewrite it.
57184  # Note: m4 eats our [], so we need to use [ and ] instead.
57185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57186  if test "x$has_forbidden_chars" != x; then
57187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57188    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57189  fi
57190
57191
57192  windows_path="$new_path"
57193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57194    unix_path=`$CYGPATH -u "$windows_path"`
57195    new_path="$unix_path"
57196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57198    new_path="$unix_path"
57199  fi
57200
57201  if test "x$path" != "x$new_path"; then
57202    FREETYPE_INCLUDE_PATH="$new_path"
57203    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57204$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57205  fi
57206
57207  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57208  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57209
57210    else
57211      # We're on a unix platform. Hooray! :)
57212      path="$FREETYPE_INCLUDE_PATH"
57213      has_space=`$ECHO "$path" | $GREP " "`
57214      if test "x$has_space" != x; then
57215        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57216$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57217        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57218      fi
57219
57220      # Use eval to expand a potential ~
57221      eval path="$path"
57222      if test ! -f "$path" && test ! -d "$path"; then
57223        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57224      fi
57225
57226      if test -d "$path"; then
57227        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57228      else
57229        dir="`$DIRNAME "$path"`"
57230        base="`$BASENAME "$path"`"
57231        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57232      fi
57233    fi
57234  fi
57235
57236      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
57237        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
57238      else
57239        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
57240      fi
57241    fi
57242
57243    if test "x$FREETYPE_LIBS" = x; then
57244
57245  # Only process if variable expands to non-empty
57246
57247  if test "x$FREETYPE_LIB_PATH" != x; then
57248    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57249
57250  # Input might be given as Windows format, start by converting to
57251  # unix format.
57252  path="$FREETYPE_LIB_PATH"
57253  new_path=`$CYGPATH -u "$path"`
57254
57255  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57256  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57257  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57258  # "foo.exe" is OK but "foo" is an error.
57259  #
57260  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57261  # It is also a way to make sure we got the proper file name for the real test later on.
57262  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57263  if test "x$test_shortpath" = x; then
57264    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57265$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57266    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
57267  fi
57268
57269  # Call helper function which possibly converts this using DOS-style short mode.
57270  # If so, the updated path is stored in $new_path.
57271
57272  input_path="$new_path"
57273  # Check if we need to convert this using DOS-style short mode. If the path
57274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57275  # take no chances and rewrite it.
57276  # Note: m4 eats our [], so we need to use [ and ] instead.
57277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57278  if test "x$has_forbidden_chars" != x; then
57279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57280    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57281    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57282    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57283      # Going to short mode and back again did indeed matter. Since short mode is
57284      # case insensitive, let's make it lowercase to improve readability.
57285      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57286      # Now convert it back to Unix-style (cygpath)
57287      input_path=`$CYGPATH -u "$shortmode_path"`
57288      new_path="$input_path"
57289    fi
57290  fi
57291
57292  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57293  if test "x$test_cygdrive_prefix" = x; then
57294    # As a simple fix, exclude /usr/bin since it's not a real path.
57295    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57296      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57297      # a path prefixed by /cygdrive for fixpath to work.
57298      new_path="$CYGWIN_ROOT_PATH$input_path"
57299    fi
57300  fi
57301
57302
57303  if test "x$path" != "x$new_path"; then
57304    FREETYPE_LIB_PATH="$new_path"
57305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
57306$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57307  fi
57308
57309    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57310
57311  path="$FREETYPE_LIB_PATH"
57312  has_colon=`$ECHO $path | $GREP ^.:`
57313  new_path="$path"
57314  if test "x$has_colon" = x; then
57315    # Not in mixed or Windows style, start by that.
57316    new_path=`cmd //c echo $path`
57317  fi
57318
57319
57320  input_path="$new_path"
57321  # Check if we need to convert this using DOS-style short mode. If the path
57322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57323  # take no chances and rewrite it.
57324  # Note: m4 eats our [], so we need to use [ and ] instead.
57325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57326  if test "x$has_forbidden_chars" != x; then
57327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57328    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57329  fi
57330
57331
57332  windows_path="$new_path"
57333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57334    unix_path=`$CYGPATH -u "$windows_path"`
57335    new_path="$unix_path"
57336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57338    new_path="$unix_path"
57339  fi
57340
57341  if test "x$path" != "x$new_path"; then
57342    FREETYPE_LIB_PATH="$new_path"
57343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
57344$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57345  fi
57346
57347  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57348  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57349
57350    else
57351      # We're on a unix platform. Hooray! :)
57352      path="$FREETYPE_LIB_PATH"
57353      has_space=`$ECHO "$path" | $GREP " "`
57354      if test "x$has_space" != x; then
57355        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57356$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57357        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57358      fi
57359
57360      # Use eval to expand a potential ~
57361      eval path="$path"
57362      if test ! -f "$path" && test ! -d "$path"; then
57363        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57364      fi
57365
57366      if test -d "$path"; then
57367        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57368      else
57369        dir="`$DIRNAME "$path"`"
57370        base="`$BASENAME "$path"`"
57371        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57372      fi
57373    fi
57374  fi
57375
57376      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57377        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
57378      else
57379        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
57380      fi
57381    fi
57382
57383    # Try to compile it
57384    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
57385$as_echo_n "checking if we can compile and link with freetype... " >&6; }
57386    ac_ext=cpp
57387ac_cpp='$CXXCPP $CPPFLAGS'
57388ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57389ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57390ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57391
57392    PREV_CXXCFLAGS="$CXXFLAGS"
57393    PREV_LIBS="$LIBS"
57394    PREV_CXX="$CXX"
57395    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
57396    LIBS="$LIBS $FREETYPE_LIBS"
57397    CXX="$FIXPATH $CXX"
57398    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57399/* end confdefs.h.  */
57400
57401          #include<ft2build.h>
57402          #include FT_FREETYPE_H
57403          int main () {
57404            FT_Init_FreeType(NULL);
57405            return 0;
57406          }
57407
57408_ACEOF
57409if ac_fn_cxx_try_link "$LINENO"; then :
57410
57411          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57412$as_echo "yes" >&6; }
57413
57414else
57415
57416          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57417$as_echo "no" >&6; }
57418          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
57419$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
57420          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
57421$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
57422
57423
57424  # Print a helpful message on how to acquire the necessary build dependency.
57425  # freetype is the help tag: freetype, cups, alsa etc
57426  MISSING_DEPENDENCY=freetype
57427
57428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57429    cygwin_help $MISSING_DEPENDENCY
57430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57431    msys_help $MISSING_DEPENDENCY
57432  else
57433    PKGHANDLER_COMMAND=
57434
57435    case $PKGHANDLER in
57436      apt-get)
57437        apt_help     $MISSING_DEPENDENCY ;;
57438      yum)
57439        yum_help     $MISSING_DEPENDENCY ;;
57440      port)
57441        port_help    $MISSING_DEPENDENCY ;;
57442      pkgutil)
57443        pkgutil_help $MISSING_DEPENDENCY ;;
57444      pkgadd)
57445        pkgadd_help  $MISSING_DEPENDENCY ;;
57446    esac
57447
57448    if test "x$PKGHANDLER_COMMAND" != x; then
57449      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57450    fi
57451  fi
57452
57453
57454          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
57455
57456
57457fi
57458rm -f core conftest.err conftest.$ac_objext \
57459    conftest$ac_exeext conftest.$ac_ext
57460    CXXCFLAGS="$PREV_CXXFLAGS"
57461    LIBS="$PREV_LIBS"
57462    CXX="$PREV_CXX"
57463    ac_ext=cpp
57464ac_cpp='$CXXCPP $CPPFLAGS'
57465ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57466ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57467ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57468
57469
57470    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
57471$as_echo_n "checking if we should bundle freetype... " >&6; }
57472    if test "x$BUNDLE_FREETYPE" = xyes; then
57473      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
57474    fi
57475    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
57476$as_echo "$BUNDLE_FREETYPE" >&6; }
57477
57478  fi # end freetype needed
57479
57480
57481
57482
57483
57484
57485
57486# Check whether --with-alsa was given.
57487if test "${with_alsa+set}" = set; then :
57488  withval=$with_alsa;
57489fi
57490
57491
57492# Check whether --with-alsa-include was given.
57493if test "${with_alsa_include+set}" = set; then :
57494  withval=$with_alsa_include;
57495fi
57496
57497
57498# Check whether --with-alsa-lib was given.
57499if test "${with_alsa_lib+set}" = set; then :
57500  withval=$with_alsa_lib;
57501fi
57502
57503
57504  if test "x$NEEDS_LIB_ALSA" = xfalse; then
57505    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
57506        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
57507        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
57508      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
57509$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
57510    fi
57511    ALSA_CFLAGS=
57512    ALSA_LIBS=
57513  else
57514    ALSA_FOUND=no
57515
57516    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
57517      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
57518    fi
57519
57520    if test "x${with_alsa}" != x; then
57521      ALSA_LIBS="-L${with_alsa}/lib -lasound"
57522      ALSA_CFLAGS="-I${with_alsa}/include"
57523      ALSA_FOUND=yes
57524    fi
57525    if test "x${with_alsa_include}" != x; then
57526      ALSA_CFLAGS="-I${with_alsa_include}"
57527      ALSA_FOUND=yes
57528    fi
57529    if test "x${with_alsa_lib}" != x; then
57530      ALSA_LIBS="-L${with_alsa_lib} -lasound"
57531      ALSA_FOUND=yes
57532    fi
57533    # Do not try pkg-config if we have a sysroot set.
57534    if test "x$SYSROOT" = x; then
57535      if test "x$ALSA_FOUND" = xno; then
57536
57537pkg_failed=no
57538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
57539$as_echo_n "checking for ALSA... " >&6; }
57540
57541if test -n "$ALSA_CFLAGS"; then
57542    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
57543 elif test -n "$PKG_CONFIG"; then
57544    if test -n "$PKG_CONFIG" && \
57545    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
57546  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
57547  ac_status=$?
57548  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57549  test $ac_status = 0; }; then
57550  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
57551else
57552  pkg_failed=yes
57553fi
57554 else
57555    pkg_failed=untried
57556fi
57557if test -n "$ALSA_LIBS"; then
57558    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
57559 elif test -n "$PKG_CONFIG"; then
57560    if test -n "$PKG_CONFIG" && \
57561    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
57562  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
57563  ac_status=$?
57564  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57565  test $ac_status = 0; }; then
57566  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
57567else
57568  pkg_failed=yes
57569fi
57570 else
57571    pkg_failed=untried
57572fi
57573
57574
57575
57576if test $pkg_failed = yes; then
57577
57578if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57579        _pkg_short_errors_supported=yes
57580else
57581        _pkg_short_errors_supported=no
57582fi
57583        if test $_pkg_short_errors_supported = yes; then
57584	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
57585        else
57586	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
57587        fi
57588	# Put the nasty error message in config.log where it belongs
57589	echo "$ALSA_PKG_ERRORS" >&5
57590
57591	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57592$as_echo "no" >&6; }
57593                ALSA_FOUND=no
57594elif test $pkg_failed = untried; then
57595	ALSA_FOUND=no
57596else
57597	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
57598	ALSA_LIBS=$pkg_cv_ALSA_LIBS
57599        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57600$as_echo "yes" >&6; }
57601	ALSA_FOUND=yes
57602fi
57603      fi
57604    fi
57605    if test "x$ALSA_FOUND" = xno; then
57606      for ac_header in alsa/asoundlib.h
57607do :
57608  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
57609if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
57610  cat >>confdefs.h <<_ACEOF
57611#define HAVE_ALSA_ASOUNDLIB_H 1
57612_ACEOF
57613
57614            ALSA_FOUND=yes
57615            ALSA_CFLAGS=-Iignoreme
57616            ALSA_LIBS=-lasound
57617            DEFAULT_ALSA=yes
57618
57619else
57620  ALSA_FOUND=no
57621
57622fi
57623
57624done
57625
57626    fi
57627    if test "x$ALSA_FOUND" = xno; then
57628
57629  # Print a helpful message on how to acquire the necessary build dependency.
57630  # alsa is the help tag: freetype, cups, alsa etc
57631  MISSING_DEPENDENCY=alsa
57632
57633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57634    cygwin_help $MISSING_DEPENDENCY
57635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57636    msys_help $MISSING_DEPENDENCY
57637  else
57638    PKGHANDLER_COMMAND=
57639
57640    case $PKGHANDLER in
57641      apt-get)
57642        apt_help     $MISSING_DEPENDENCY ;;
57643      yum)
57644        yum_help     $MISSING_DEPENDENCY ;;
57645      port)
57646        port_help    $MISSING_DEPENDENCY ;;
57647      pkgutil)
57648        pkgutil_help $MISSING_DEPENDENCY ;;
57649      pkgadd)
57650        pkgadd_help  $MISSING_DEPENDENCY ;;
57651    esac
57652
57653    if test "x$PKGHANDLER_COMMAND" != x; then
57654      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57655    fi
57656  fi
57657
57658      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
57659    fi
57660  fi
57661
57662
57663
57664
57665
57666
57667# Check whether --with-libffi was given.
57668if test "${with_libffi+set}" = set; then :
57669  withval=$with_libffi;
57670fi
57671
57672
57673# Check whether --with-libffi-include was given.
57674if test "${with_libffi_include+set}" = set; then :
57675  withval=$with_libffi_include;
57676fi
57677
57678
57679# Check whether --with-libffi-lib was given.
57680if test "${with_libffi_lib+set}" = set; then :
57681  withval=$with_libffi_lib;
57682fi
57683
57684
57685  if test "x$NEEDS_LIB_FFI" = xfalse; then
57686    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
57687        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
57688        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
57689      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
57690$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
57691    fi
57692    LIBFFI_CFLAGS=
57693    LIBFFI_LIBS=
57694  else
57695    LIBFFI_FOUND=no
57696
57697    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
57698      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
57699    fi
57700
57701    if test "x${with_libffi}" != x; then
57702      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
57703      LIBFFI_CFLAGS="-I${with_libffi}/include"
57704      LIBFFI_FOUND=yes
57705    fi
57706    if test "x${with_libffi_include}" != x; then
57707      LIBFFI_CFLAGS="-I${with_libffi_include}"
57708      LIBFFI_FOUND=yes
57709    fi
57710    if test "x${with_libffi_lib}" != x; then
57711      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
57712      LIBFFI_FOUND=yes
57713    fi
57714    # Do not try pkg-config if we have a sysroot set.
57715    if test "x$SYSROOT" = x; then
57716      if test "x$LIBFFI_FOUND" = xno; then
57717        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
57718
57719pkg_failed=no
57720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
57721$as_echo_n "checking for LIBFFI... " >&6; }
57722
57723if test -n "$LIBFFI_CFLAGS"; then
57724    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
57725 elif test -n "$PKG_CONFIG"; then
57726    if test -n "$PKG_CONFIG" && \
57727    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
57728  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
57729  ac_status=$?
57730  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57731  test $ac_status = 0; }; then
57732  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
57733else
57734  pkg_failed=yes
57735fi
57736 else
57737    pkg_failed=untried
57738fi
57739if test -n "$LIBFFI_LIBS"; then
57740    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
57741 elif test -n "$PKG_CONFIG"; then
57742    if test -n "$PKG_CONFIG" && \
57743    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
57744  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
57745  ac_status=$?
57746  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57747  test $ac_status = 0; }; then
57748  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
57749else
57750  pkg_failed=yes
57751fi
57752 else
57753    pkg_failed=untried
57754fi
57755
57756
57757
57758if test $pkg_failed = yes; then
57759
57760if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57761        _pkg_short_errors_supported=yes
57762else
57763        _pkg_short_errors_supported=no
57764fi
57765        if test $_pkg_short_errors_supported = yes; then
57766	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
57767        else
57768	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
57769        fi
57770	# Put the nasty error message in config.log where it belongs
57771	echo "$LIBFFI_PKG_ERRORS" >&5
57772
57773	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57774$as_echo "no" >&6; }
57775                LIBFFI_FOUND=no
57776elif test $pkg_failed = untried; then
57777	LIBFFI_FOUND=no
57778else
57779	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
57780	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
57781        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57782$as_echo "yes" >&6; }
57783	LIBFFI_FOUND=yes
57784fi
57785      fi
57786    fi
57787    if test "x$LIBFFI_FOUND" = xno; then
57788      for ac_header in ffi.h
57789do :
57790  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
57791if test "x$ac_cv_header_ffi_h" = xyes; then :
57792  cat >>confdefs.h <<_ACEOF
57793#define HAVE_FFI_H 1
57794_ACEOF
57795
57796            LIBFFI_FOUND=yes
57797            LIBFFI_CFLAGS=
57798            LIBFFI_LIBS=-lffi
57799
57800else
57801  LIBFFI_FOUND=no
57802
57803fi
57804
57805done
57806
57807    fi
57808    if test "x$LIBFFI_FOUND" = xno; then
57809
57810  # Print a helpful message on how to acquire the necessary build dependency.
57811  # ffi is the help tag: freetype, cups, alsa etc
57812  MISSING_DEPENDENCY=ffi
57813
57814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57815    cygwin_help $MISSING_DEPENDENCY
57816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57817    msys_help $MISSING_DEPENDENCY
57818  else
57819    PKGHANDLER_COMMAND=
57820
57821    case $PKGHANDLER in
57822      apt-get)
57823        apt_help     $MISSING_DEPENDENCY ;;
57824      yum)
57825        yum_help     $MISSING_DEPENDENCY ;;
57826      port)
57827        port_help    $MISSING_DEPENDENCY ;;
57828      pkgutil)
57829        pkgutil_help $MISSING_DEPENDENCY ;;
57830      pkgadd)
57831        pkgadd_help  $MISSING_DEPENDENCY ;;
57832    esac
57833
57834    if test "x$PKGHANDLER_COMMAND" != x; then
57835      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57836    fi
57837  fi
57838
57839      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
57840    fi
57841
57842    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
57843$as_echo_n "checking if libffi works... " >&6; }
57844    ac_ext=c
57845ac_cpp='$CPP $CPPFLAGS'
57846ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57847ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57848ac_compiler_gnu=$ac_cv_c_compiler_gnu
57849
57850    OLD_CFLAGS="$CFLAGS"
57851    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
57852    OLD_LIBS="$LIBS"
57853    LIBS="$LIBS $LIBFFI_LIBS"
57854    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57855/* end confdefs.h.  */
57856#include <ffi.h>
57857int
57858main ()
57859{
57860
57861          ffi_call(NULL, NULL, NULL, NULL);
57862          return 0;
57863
57864  ;
57865  return 0;
57866}
57867_ACEOF
57868if ac_fn_c_try_link "$LINENO"; then :
57869  LIBFFI_WORKS=yes
57870else
57871  LIBFFI_WORKS=no
57872
57873fi
57874rm -f core conftest.err conftest.$ac_objext \
57875    conftest$ac_exeext conftest.$ac_ext
57876    CFLAGS="$OLD_CFLAGS"
57877    LIBS="$OLD_LIBS"
57878    ac_ext=cpp
57879ac_cpp='$CXXCPP $CPPFLAGS'
57880ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57881ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57882ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57883
57884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
57885$as_echo "$LIBFFI_WORKS" >&6; }
57886
57887    if test "x$LIBFFI_WORKS" = xno; then
57888
57889  # Print a helpful message on how to acquire the necessary build dependency.
57890  # ffi is the help tag: freetype, cups, alsa etc
57891  MISSING_DEPENDENCY=ffi
57892
57893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57894    cygwin_help $MISSING_DEPENDENCY
57895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57896    msys_help $MISSING_DEPENDENCY
57897  else
57898    PKGHANDLER_COMMAND=
57899
57900    case $PKGHANDLER in
57901      apt-get)
57902        apt_help     $MISSING_DEPENDENCY ;;
57903      yum)
57904        yum_help     $MISSING_DEPENDENCY ;;
57905      port)
57906        port_help    $MISSING_DEPENDENCY ;;
57907      pkgutil)
57908        pkgutil_help $MISSING_DEPENDENCY ;;
57909      pkgadd)
57910        pkgadd_help  $MISSING_DEPENDENCY ;;
57911    esac
57912
57913    if test "x$PKGHANDLER_COMMAND" != x; then
57914      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57915    fi
57916  fi
57917
57918      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
57919    fi
57920  fi
57921
57922
57923
57924
57925
57926  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
57927    # Extract the first word of "llvm-config", so it can be a program name with args.
57928set dummy llvm-config; ac_word=$2
57929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57930$as_echo_n "checking for $ac_word... " >&6; }
57931if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
57932  $as_echo_n "(cached) " >&6
57933else
57934  if test -n "$LLVM_CONFIG"; then
57935  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
57936else
57937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57938for as_dir in $PATH
57939do
57940  IFS=$as_save_IFS
57941  test -z "$as_dir" && as_dir=.
57942    for ac_exec_ext in '' $ac_executable_extensions; do
57943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57944    ac_cv_prog_LLVM_CONFIG="llvm-config"
57945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57946    break 2
57947  fi
57948done
57949  done
57950IFS=$as_save_IFS
57951
57952fi
57953fi
57954LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
57955if test -n "$LLVM_CONFIG"; then
57956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
57957$as_echo "$LLVM_CONFIG" >&6; }
57958else
57959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57960$as_echo "no" >&6; }
57961fi
57962
57963
57964
57965    if test "x$LLVM_CONFIG" != xllvm-config; then
57966      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
57967    fi
57968
57969    llvm_components="jit mcjit engine nativecodegen native"
57970    unset LLVM_CFLAGS
57971    for flag in $("$LLVM_CONFIG" --cxxflags); do
57972      if echo "${flag}" | grep -q '^-[ID]'; then
57973        if test "${flag}" != "-D_DEBUG" ; then
57974          if test "${LLVM_CFLAGS}" != "" ; then
57975            LLVM_CFLAGS="${LLVM_CFLAGS} "
57976          fi
57977          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
57978        fi
57979      fi
57980    done
57981    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
57982    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
57983
57984    unset LLVM_LDFLAGS
57985    for flag in $("${LLVM_CONFIG}" --ldflags); do
57986      if echo "${flag}" | grep -q '^-L'; then
57987        if test "${LLVM_LDFLAGS}" != ""; then
57988          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
57989        fi
57990        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
57991      fi
57992    done
57993
57994    unset LLVM_LIBS
57995    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
57996      if echo "${flag}" | grep -q '^-l'; then
57997        if test "${LLVM_LIBS}" != ""; then
57998          LLVM_LIBS="${LLVM_LIBS} "
57999        fi
58000        LLVM_LIBS="${LLVM_LIBS}${flag}"
58001      fi
58002    done
58003
58004
58005
58006
58007  fi
58008
58009
58010
58011# Check whether --with-libjpeg was given.
58012if test "${with_libjpeg+set}" = set; then :
58013  withval=$with_libjpeg;
58014fi
58015
58016
58017  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
58018$as_echo_n "checking for which libjpeg to use... " >&6; }
58019  # default is bundled
58020  DEFAULT_LIBJPEG=bundled
58021  # if user didn't specify, use DEFAULT_LIBJPEG
58022  if test "x${with_libjpeg}" = "x"; then
58023    with_libjpeg=${DEFAULT_LIBJPEG}
58024  fi
58025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
58026$as_echo "${with_libjpeg}" >&6; }
58027
58028  if test "x${with_libjpeg}" = "xbundled"; then
58029    USE_EXTERNAL_LIBJPEG=false
58030  elif test "x${with_libjpeg}" = "xsystem"; then
58031    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
58032if test "x$ac_cv_header_jpeglib_h" = xyes; then :
58033
58034else
58035   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
58036fi
58037
58038
58039    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
58040$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
58041if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
58042  $as_echo_n "(cached) " >&6
58043else
58044  ac_check_lib_save_LIBS=$LIBS
58045LIBS="-ljpeg  $LIBS"
58046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58047/* end confdefs.h.  */
58048
58049/* Override any GCC internal prototype to avoid an error.
58050   Use char because int might match the return type of a GCC
58051   builtin and then its argument prototype would still apply.  */
58052#ifdef __cplusplus
58053extern "C"
58054#endif
58055char jpeg_CreateDecompress ();
58056int
58057main ()
58058{
58059return jpeg_CreateDecompress ();
58060  ;
58061  return 0;
58062}
58063_ACEOF
58064if ac_fn_cxx_try_link "$LINENO"; then :
58065  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
58066else
58067  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
58068fi
58069rm -f core conftest.err conftest.$ac_objext \
58070    conftest$ac_exeext conftest.$ac_ext
58071LIBS=$ac_check_lib_save_LIBS
58072fi
58073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
58074$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
58075if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
58076  cat >>confdefs.h <<_ACEOF
58077#define HAVE_LIBJPEG 1
58078_ACEOF
58079
58080  LIBS="-ljpeg $LIBS"
58081
58082else
58083   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
58084fi
58085
58086
58087    USE_EXTERNAL_LIBJPEG=true
58088  else
58089    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
58090  fi
58091
58092
58093
58094
58095
58096# Check whether --with-giflib was given.
58097if test "${with_giflib+set}" = set; then :
58098  withval=$with_giflib;
58099fi
58100
58101
58102  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
58103$as_echo_n "checking for which giflib to use... " >&6; }
58104  # default is bundled
58105  DEFAULT_GIFLIB=bundled
58106  # if user didn't specify, use DEFAULT_GIFLIB
58107  if test "x${with_giflib}" = "x"; then
58108    with_giflib=${DEFAULT_GIFLIB}
58109  fi
58110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
58111$as_echo "${with_giflib}" >&6; }
58112
58113  if test "x${with_giflib}" = "xbundled"; then
58114    USE_EXTERNAL_LIBGIF=false
58115  elif test "x${with_giflib}" = "xsystem"; then
58116    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
58117if test "x$ac_cv_header_gif_lib_h" = xyes; then :
58118
58119else
58120   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
58121fi
58122
58123
58124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
58125$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
58126if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
58127  $as_echo_n "(cached) " >&6
58128else
58129  ac_check_lib_save_LIBS=$LIBS
58130LIBS="-lgif  $LIBS"
58131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58132/* end confdefs.h.  */
58133
58134/* Override any GCC internal prototype to avoid an error.
58135   Use char because int might match the return type of a GCC
58136   builtin and then its argument prototype would still apply.  */
58137#ifdef __cplusplus
58138extern "C"
58139#endif
58140char DGifGetCode ();
58141int
58142main ()
58143{
58144return DGifGetCode ();
58145  ;
58146  return 0;
58147}
58148_ACEOF
58149if ac_fn_cxx_try_link "$LINENO"; then :
58150  ac_cv_lib_gif_DGifGetCode=yes
58151else
58152  ac_cv_lib_gif_DGifGetCode=no
58153fi
58154rm -f core conftest.err conftest.$ac_objext \
58155    conftest$ac_exeext conftest.$ac_ext
58156LIBS=$ac_check_lib_save_LIBS
58157fi
58158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
58159$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
58160if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
58161  cat >>confdefs.h <<_ACEOF
58162#define HAVE_LIBGIF 1
58163_ACEOF
58164
58165  LIBS="-lgif $LIBS"
58166
58167else
58168   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
58169fi
58170
58171
58172    USE_EXTERNAL_LIBGIF=true
58173  else
58174    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
58175  fi
58176
58177
58178
58179
58180
58181# Check whether --with-libpng was given.
58182if test "${with_libpng+set}" = set; then :
58183  withval=$with_libpng;
58184fi
58185
58186
58187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
58188$as_echo_n "checking for which libpng to use... " >&6; }
58189
58190  # default is bundled
58191  DEFAULT_LIBPNG=bundled
58192  # if user didn't specify, use DEFAULT_LIBPNG
58193  if test "x${with_libpng}" = "x"; then
58194      with_libpng=${DEFAULT_LIBPNG}
58195  fi
58196
58197  if test "x${with_libpng}" = "xbundled"; then
58198      USE_EXTERNAL_LIBPNG=false
58199      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58200$as_echo "bundled" >&6; }
58201  elif test "x${with_libpng}" = "xsystem"; then
58202
58203pkg_failed=no
58204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
58205$as_echo_n "checking for PNG... " >&6; }
58206
58207if test -n "$PNG_CFLAGS"; then
58208    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
58209 elif test -n "$PKG_CONFIG"; then
58210    if test -n "$PKG_CONFIG" && \
58211    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
58212  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
58213  ac_status=$?
58214  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58215  test $ac_status = 0; }; then
58216  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
58217else
58218  pkg_failed=yes
58219fi
58220 else
58221    pkg_failed=untried
58222fi
58223if test -n "$PNG_LIBS"; then
58224    pkg_cv_PNG_LIBS="$PNG_LIBS"
58225 elif test -n "$PKG_CONFIG"; then
58226    if test -n "$PKG_CONFIG" && \
58227    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
58228  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
58229  ac_status=$?
58230  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58231  test $ac_status = 0; }; then
58232  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
58233else
58234  pkg_failed=yes
58235fi
58236 else
58237    pkg_failed=untried
58238fi
58239
58240
58241
58242if test $pkg_failed = yes; then
58243
58244if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58245        _pkg_short_errors_supported=yes
58246else
58247        _pkg_short_errors_supported=no
58248fi
58249        if test $_pkg_short_errors_supported = yes; then
58250	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
58251        else
58252	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
58253        fi
58254	# Put the nasty error message in config.log where it belongs
58255	echo "$PNG_PKG_ERRORS" >&5
58256
58257	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58258$as_echo "no" >&6; }
58259                 LIBPNG_FOUND=no
58260elif test $pkg_failed = untried; then
58261	 LIBPNG_FOUND=no
58262else
58263	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
58264	PNG_LIBS=$pkg_cv_PNG_LIBS
58265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58266$as_echo "yes" >&6; }
58267	 LIBPNG_FOUND=yes
58268fi
58269      if test "x${LIBPNG_FOUND}" = "xyes"; then
58270          USE_EXTERNAL_LIBPNG=true
58271          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58272$as_echo "system" >&6; }
58273      else
58274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
58275$as_echo "system not found" >&6; }
58276          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
58277      fi
58278  else
58279      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
58280  fi
58281
58282
58283
58284
58285
58286# Check whether --with-zlib was given.
58287if test "${with_zlib+set}" = set; then :
58288  withval=$with_zlib;
58289fi
58290
58291
58292  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
58293$as_echo_n "checking for compress in -lz... " >&6; }
58294if ${ac_cv_lib_z_compress+:} false; then :
58295  $as_echo_n "(cached) " >&6
58296else
58297  ac_check_lib_save_LIBS=$LIBS
58298LIBS="-lz  $LIBS"
58299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58300/* end confdefs.h.  */
58301
58302/* Override any GCC internal prototype to avoid an error.
58303   Use char because int might match the return type of a GCC
58304   builtin and then its argument prototype would still apply.  */
58305#ifdef __cplusplus
58306extern "C"
58307#endif
58308char compress ();
58309int
58310main ()
58311{
58312return compress ();
58313  ;
58314  return 0;
58315}
58316_ACEOF
58317if ac_fn_cxx_try_link "$LINENO"; then :
58318  ac_cv_lib_z_compress=yes
58319else
58320  ac_cv_lib_z_compress=no
58321fi
58322rm -f core conftest.err conftest.$ac_objext \
58323    conftest$ac_exeext conftest.$ac_ext
58324LIBS=$ac_check_lib_save_LIBS
58325fi
58326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
58327$as_echo "$ac_cv_lib_z_compress" >&6; }
58328if test "x$ac_cv_lib_z_compress" = xyes; then :
58329   ZLIB_FOUND=yes
58330else
58331   ZLIB_FOUND=no
58332fi
58333
58334
58335  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
58336$as_echo_n "checking for which zlib to use... " >&6; }
58337
58338  DEFAULT_ZLIB=bundled
58339  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
58340    # On macosx default is system...on others default is bundled
58341    DEFAULT_ZLIB=system
58342  fi
58343
58344  if test "x${ZLIB_FOUND}" != "xyes"; then
58345    # If we don't find any system...set default to bundled
58346    DEFAULT_ZLIB=bundled
58347  fi
58348
58349  # If user didn't specify, use DEFAULT_ZLIB
58350  if test "x${with_zlib}" = "x"; then
58351    with_zlib=${DEFAULT_ZLIB}
58352  fi
58353
58354  if test "x${with_zlib}" = "xbundled"; then
58355    USE_EXTERNAL_LIBZ=false
58356    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58357$as_echo "bundled" >&6; }
58358  elif test "x${with_zlib}" = "xsystem"; then
58359    if test "x${ZLIB_FOUND}" = "xyes"; then
58360      USE_EXTERNAL_LIBZ=true
58361      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58362$as_echo "system" >&6; }
58363    else
58364      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
58365$as_echo "system not found" >&6; }
58366      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
58367    fi
58368  else
58369    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
58370  fi
58371
58372
58373
58374
58375
58376# Check whether --with-lcms was given.
58377if test "${with_lcms+set}" = set; then :
58378  withval=$with_lcms;
58379fi
58380
58381
58382  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
58383$as_echo_n "checking for which lcms to use... " >&6; }
58384
58385  DEFAULT_LCMS=bundled
58386  # If user didn't specify, use DEFAULT_LCMS
58387  if test "x${with_lcms}" = "x"; then
58388      with_lcms=${DEFAULT_LCMS}
58389  fi
58390
58391  if test "x${with_lcms}" = "xbundled"; then
58392    USE_EXTERNAL_LCMS=false
58393    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58394$as_echo "bundled" >&6; }
58395  elif test "x${with_lcms}" = "xsystem"; then
58396    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58397$as_echo "system" >&6; }
58398
58399pkg_failed=no
58400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
58401$as_echo_n "checking for LCMS... " >&6; }
58402
58403if test -n "$LCMS_CFLAGS"; then
58404    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
58405 elif test -n "$PKG_CONFIG"; then
58406    if test -n "$PKG_CONFIG" && \
58407    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
58408  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
58409  ac_status=$?
58410  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58411  test $ac_status = 0; }; then
58412  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
58413else
58414  pkg_failed=yes
58415fi
58416 else
58417    pkg_failed=untried
58418fi
58419if test -n "$LCMS_LIBS"; then
58420    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
58421 elif test -n "$PKG_CONFIG"; then
58422    if test -n "$PKG_CONFIG" && \
58423    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
58424  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
58425  ac_status=$?
58426  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58427  test $ac_status = 0; }; then
58428  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
58429else
58430  pkg_failed=yes
58431fi
58432 else
58433    pkg_failed=untried
58434fi
58435
58436
58437
58438if test $pkg_failed = yes; then
58439
58440if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58441        _pkg_short_errors_supported=yes
58442else
58443        _pkg_short_errors_supported=no
58444fi
58445        if test $_pkg_short_errors_supported = yes; then
58446	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
58447        else
58448	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
58449        fi
58450	# Put the nasty error message in config.log where it belongs
58451	echo "$LCMS_PKG_ERRORS" >&5
58452
58453	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58454$as_echo "no" >&6; }
58455                LCMS_FOUND=no
58456elif test $pkg_failed = untried; then
58457	LCMS_FOUND=no
58458else
58459	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
58460	LCMS_LIBS=$pkg_cv_LCMS_LIBS
58461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58462$as_echo "yes" >&6; }
58463	LCMS_FOUND=yes
58464fi
58465    if test "x${LCMS_FOUND}" = "xyes"; then
58466      USE_EXTERNAL_LCMS=true
58467    else
58468      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
58469    fi
58470  else
58471    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
58472  fi
58473
58474
58475
58476
58477
58478
58479
58480
58481
58482
58483
58484  # Setup libm (the maths library)
58485  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
58486$as_echo_n "checking for cos in -lm... " >&6; }
58487if ${ac_cv_lib_m_cos+:} false; then :
58488  $as_echo_n "(cached) " >&6
58489else
58490  ac_check_lib_save_LIBS=$LIBS
58491LIBS="-lm  $LIBS"
58492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58493/* end confdefs.h.  */
58494
58495/* Override any GCC internal prototype to avoid an error.
58496   Use char because int might match the return type of a GCC
58497   builtin and then its argument prototype would still apply.  */
58498#ifdef __cplusplus
58499extern "C"
58500#endif
58501char cos ();
58502int
58503main ()
58504{
58505return cos ();
58506  ;
58507  return 0;
58508}
58509_ACEOF
58510if ac_fn_cxx_try_link "$LINENO"; then :
58511  ac_cv_lib_m_cos=yes
58512else
58513  ac_cv_lib_m_cos=no
58514fi
58515rm -f core conftest.err conftest.$ac_objext \
58516    conftest$ac_exeext conftest.$ac_ext
58517LIBS=$ac_check_lib_save_LIBS
58518fi
58519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
58520$as_echo "$ac_cv_lib_m_cos" >&6; }
58521if test "x$ac_cv_lib_m_cos" = xyes; then :
58522  cat >>confdefs.h <<_ACEOF
58523#define HAVE_LIBM 1
58524_ACEOF
58525
58526  LIBS="-lm $LIBS"
58527
58528else
58529
58530      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
58531$as_echo "$as_me: Maths library was not found" >&6;}
58532
58533fi
58534
58535  LIBM=-lm
58536
58537
58538  # Setup libdl (for dynamic library loading)
58539  save_LIBS="$LIBS"
58540  LIBS=""
58541  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
58542$as_echo_n "checking for dlopen in -ldl... " >&6; }
58543if ${ac_cv_lib_dl_dlopen+:} false; then :
58544  $as_echo_n "(cached) " >&6
58545else
58546  ac_check_lib_save_LIBS=$LIBS
58547LIBS="-ldl  $LIBS"
58548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58549/* end confdefs.h.  */
58550
58551/* Override any GCC internal prototype to avoid an error.
58552   Use char because int might match the return type of a GCC
58553   builtin and then its argument prototype would still apply.  */
58554#ifdef __cplusplus
58555extern "C"
58556#endif
58557char dlopen ();
58558int
58559main ()
58560{
58561return dlopen ();
58562  ;
58563  return 0;
58564}
58565_ACEOF
58566if ac_fn_cxx_try_link "$LINENO"; then :
58567  ac_cv_lib_dl_dlopen=yes
58568else
58569  ac_cv_lib_dl_dlopen=no
58570fi
58571rm -f core conftest.err conftest.$ac_objext \
58572    conftest$ac_exeext conftest.$ac_ext
58573LIBS=$ac_check_lib_save_LIBS
58574fi
58575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
58576$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
58577if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
58578  cat >>confdefs.h <<_ACEOF
58579#define HAVE_LIBDL 1
58580_ACEOF
58581
58582  LIBS="-ldl $LIBS"
58583
58584fi
58585
58586  LIBDL="$LIBS"
58587
58588  LIBS="$save_LIBS"
58589
58590  # Deprecated libraries, keep the flags for backwards compatibility
58591  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
58592
58593
58594# Check whether --with-dxsdk was given.
58595if test "${with_dxsdk+set}" = set; then :
58596  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
58597$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
58598fi
58599
58600
58601
58602
58603# Check whether --with-dxsdk-lib was given.
58604if test "${with_dxsdk_lib+set}" = set; then :
58605  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
58606$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
58607fi
58608
58609
58610
58611
58612# Check whether --with-dxsdk-include was given.
58613if test "${with_dxsdk_include+set}" = set; then :
58614  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
58615$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
58616fi
58617
58618
58619  fi
58620
58621  # Control if libzip can use mmap. Available for purposes of overriding.
58622  LIBZIP_CAN_USE_MMAP=true
58623
58624
58625
58626
58627
58628
58629
58630
58631
58632
58633
58634
58635
58636
58637###############################################################################
58638#
58639# We need to do some final tweaking, when everything else is done.
58640#
58641###############################################################################
58642
58643
58644  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
58645
58646
58647
58648  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
58649$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
58650
58651  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
58652    ENABLE_INTREE_EC=yes
58653    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58654$as_echo "yes" >&6; }
58655  else
58656    ENABLE_INTREE_EC=no
58657    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58658$as_echo "no" >&6; }
58659  fi
58660
58661
58662
58663
58664###############################################################################
58665#
58666# Configure parts of the build that only affect the build performance,
58667# not the result.
58668#
58669###############################################################################
58670
58671
58672  # How many cores do we have on this build system?
58673
58674# Check whether --with-num-cores was given.
58675if test "${with_num_cores+set}" = set; then :
58676  withval=$with_num_cores;
58677fi
58678
58679  if test "x$with_num_cores" = x; then
58680    # The number of cores were not specified, try to probe them.
58681
58682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
58683$as_echo_n "checking for number of cores... " >&6; }
58684  NUM_CORES=1
58685  FOUND_CORES=no
58686
58687  if test -f /proc/cpuinfo; then
58688    # Looks like a Linux (or cygwin) system
58689    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
58690    FOUND_CORES=yes
58691  elif test -x /usr/sbin/psrinfo; then
58692    # Looks like a Solaris system
58693    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
58694    FOUND_CORES=yes
58695  elif test -x /usr/sbin/system_profiler; then
58696    # Looks like a MacOSX system
58697    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
58698    FOUND_CORES=yes
58699  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
58700    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
58701    FOUND_CORES=yes
58702  elif test -n "$NUMBER_OF_PROCESSORS"; then
58703    # On windows, look in the env
58704    NUM_CORES=$NUMBER_OF_PROCESSORS
58705    FOUND_CORES=yes
58706  fi
58707
58708  if test "x$FOUND_CORES" = xyes; then
58709    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
58710$as_echo "$NUM_CORES" >&6; }
58711  else
58712    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
58713$as_echo "could not detect number of cores, defaulting to 1" >&6; }
58714    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
58715$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
58716  fi
58717
58718  else
58719    NUM_CORES=$with_num_cores
58720  fi
58721
58722
58723
58724  # How much memory do we have on this build system?
58725
58726# Check whether --with-memory-size was given.
58727if test "${with_memory_size+set}" = set; then :
58728  withval=$with_memory_size;
58729fi
58730
58731  if test "x$with_memory_size" = x; then
58732    # The memory size was not specified, try to probe it.
58733
58734  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
58735$as_echo_n "checking for memory size... " >&6; }
58736  # Default to 1024 MB
58737  MEMORY_SIZE=1024
58738  FOUND_MEM=no
58739
58740  if test -f /proc/meminfo; then
58741    # Looks like a Linux (or cygwin) system
58742    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
58743    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
58744    FOUND_MEM=yes
58745  elif test -x /usr/sbin/prtconf; then
58746    # Looks like a Solaris or AIX system
58747    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
58748    FOUND_MEM=yes
58749  elif test -x /usr/sbin/system_profiler; then
58750    # Looks like a MacOSX system
58751    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
58752    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
58753    FOUND_MEM=yes
58754  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
58755    # Windows, but without cygwin
58756    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
58757    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
58758    FOUND_MEM=yes
58759  fi
58760
58761  if test "x$FOUND_MEM" = xyes; then
58762    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
58763$as_echo "$MEMORY_SIZE MB" >&6; }
58764  else
58765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
58766$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
58767    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
58768$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
58769  fi
58770
58771  else
58772    MEMORY_SIZE=$with_memory_size
58773  fi
58774
58775
58776
58777  # Provide a decent default number of parallel jobs for make depending on
58778  # number of cores, amount of memory and machine architecture.
58779
58780# Check whether --with-jobs was given.
58781if test "${with_jobs+set}" = set; then :
58782  withval=$with_jobs;
58783fi
58784
58785  if test "x$with_jobs" = x; then
58786    # Number of jobs was not specified, calculate.
58787    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
58788$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
58789    # Approximate memory in GB.
58790    memory_gb=`expr $MEMORY_SIZE / 1024`
58791    # Pick the lowest of memory in gb and number of cores.
58792    if test "$memory_gb" -lt "$NUM_CORES"; then
58793      JOBS="$memory_gb"
58794    else
58795      JOBS="$NUM_CORES"
58796    fi
58797    if test "$JOBS" -eq "0"; then
58798      JOBS=1
58799    fi
58800    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
58801$as_echo "$JOBS" >&6; }
58802  else
58803    JOBS=$with_jobs
58804  fi
58805
58806
58807
58808  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
58809
58810# Check whether --with-test-jobs was given.
58811if test "${with_test_jobs+set}" = set; then :
58812  withval=$with_test_jobs;
58813fi
58814
58815  if test "x$with_test_jobs" = x; then
58816      TEST_JOBS=0
58817  else
58818      TEST_JOBS=$with_test_jobs
58819  fi
58820
58821
58822
58823# Setup arguments for the boot jdk (after cores and memory have been setup)
58824
58825  ##############################################################################
58826  #
58827  # Specify jvm options for anything that is run with the Boot JDK.
58828  # Not all JVM:s accept the same arguments on the command line.
58829  #
58830
58831# Check whether --with-boot-jdk-jvmargs was given.
58832if test "${with_boot_jdk_jvmargs+set}" = set; then :
58833  withval=$with_boot_jdk_jvmargs;
58834fi
58835
58836
58837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
58838$as_echo_n "checking flags for boot jdk java command ... " >&6; }
58839
58840  # Disable special log output when a debug build is used as Boot JDK...
58841
58842  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
58843  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
58844  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
58845  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58846  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58847  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58848    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
58849    JVM_ARG_OK=true
58850  else
58851    $ECHO "Arg failed:" >&5
58852    $ECHO "$OUTPUT" >&5
58853    JVM_ARG_OK=false
58854  fi
58855
58856
58857  # Apply user provided options.
58858
58859  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
58860  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
58861  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
58862  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58863  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58864  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58865    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
58866    JVM_ARG_OK=true
58867  else
58868    $ECHO "Arg failed:" >&5
58869    $ECHO "$OUTPUT" >&5
58870    JVM_ARG_OK=false
58871  fi
58872
58873
58874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
58875$as_echo "$boot_jdk_jvmargs" >&6; }
58876
58877  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
58878  JAVA_FLAGS=$boot_jdk_jvmargs
58879
58880
58881
58882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
58883$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
58884
58885  # Starting amount of heap memory.
58886
58887  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
58888  $ECHO "Command: $JAVA -Xms64M -version" >&5
58889  OUTPUT=`$JAVA -Xms64M -version 2>&1`
58890  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58891  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58892  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58893    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
58894    JVM_ARG_OK=true
58895  else
58896    $ECHO "Arg failed:" >&5
58897    $ECHO "$OUTPUT" >&5
58898    JVM_ARG_OK=false
58899  fi
58900
58901
58902  # Maximum amount of heap memory.
58903  # Maximum stack size.
58904  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
58905  if test "x$BOOT_JDK_BITS" = "x32"; then
58906    if test "$JVM_MAX_HEAP" -gt "1100"; then
58907      JVM_MAX_HEAP=1100
58908    elif test "$JVM_MAX_HEAP" -lt "512"; then
58909      JVM_MAX_HEAP=512
58910    fi
58911    STACK_SIZE=768
58912  else
58913    # Running a 64 bit JVM allows for and requires a bigger heap
58914    if test "$JVM_MAX_HEAP" -gt "1600"; then
58915      JVM_MAX_HEAP=1600
58916    elif test "$JVM_MAX_HEAP" -lt "512"; then
58917      JVM_MAX_HEAP=512
58918    fi
58919    STACK_SIZE=1536
58920  fi
58921
58922  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
58923  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
58924  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
58925  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58926  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58927  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58928    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
58929    JVM_ARG_OK=true
58930  else
58931    $ECHO "Arg failed:" >&5
58932    $ECHO "$OUTPUT" >&5
58933    JVM_ARG_OK=false
58934  fi
58935
58936
58937  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
58938  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
58939  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
58940  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58941  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58942  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58943    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
58944    JVM_ARG_OK=true
58945  else
58946    $ECHO "Arg failed:" >&5
58947    $ECHO "$OUTPUT" >&5
58948    JVM_ARG_OK=false
58949  fi
58950
58951
58952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
58953$as_echo "$boot_jdk_jvmargs_big" >&6; }
58954
58955  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
58956
58957
58958  # By default, the main javac compilations use big
58959  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
58960
58961
58962  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
58963$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
58964
58965  # Use serial gc for small short lived tools if possible
58966
58967  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
58968  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
58969  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
58970  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58971  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58972  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58973    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
58974    JVM_ARG_OK=true
58975  else
58976    $ECHO "Arg failed:" >&5
58977    $ECHO "$OUTPUT" >&5
58978    JVM_ARG_OK=false
58979  fi
58980
58981
58982  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
58983  $ECHO "Command: $JAVA -Xms32M -version" >&5
58984  OUTPUT=`$JAVA -Xms32M -version 2>&1`
58985  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58986  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58987  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58988    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
58989    JVM_ARG_OK=true
58990  else
58991    $ECHO "Arg failed:" >&5
58992    $ECHO "$OUTPUT" >&5
58993    JVM_ARG_OK=false
58994  fi
58995
58996
58997  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
58998  $ECHO "Command: $JAVA -Xmx512M -version" >&5
58999  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
59000  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59001  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59002  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59003    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
59004    JVM_ARG_OK=true
59005  else
59006    $ECHO "Arg failed:" >&5
59007    $ECHO "$OUTPUT" >&5
59008    JVM_ARG_OK=false
59009  fi
59010
59011
59012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
59013$as_echo "$boot_jdk_jvmargs_small" >&6; }
59014
59015  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
59016
59017
59018  JAVA_TOOL_FLAGS_SMALL=""
59019  for f in $JAVA_FLAGS_SMALL; do
59020    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
59021  done
59022
59023
59024
59025# Setup smart javac (after cores and memory have been setup)
59026
59027
59028# Check whether --with-sjavac-server-java was given.
59029if test "${with_sjavac_server_java+set}" = set; then :
59030  withval=$with_sjavac_server_java;
59031fi
59032
59033
59034  if test "x$with_sjavac_server_java" != x; then
59035    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
59036    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
59037    if test "x$FOUND_VERSION" = x; then
59038      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
59039    fi
59040  else
59041    SJAVAC_SERVER_JAVA="$JAVA"
59042  fi
59043
59044
59045  if test "$MEMORY_SIZE" -gt "3000"; then
59046
59047  $ECHO "Check if jvm arg is ok: -d64" >&5
59048  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
59049  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
59050  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59051  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59052  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59053    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
59054    JVM_ARG_OK=true
59055  else
59056    $ECHO "Arg failed:" >&5
59057    $ECHO "$OUTPUT" >&5
59058    JVM_ARG_OK=false
59059  fi
59060
59061    if test "$JVM_ARG_OK" = true; then
59062      JVM_64BIT=true
59063      JVM_ARG_OK=false
59064    fi
59065  fi
59066
59067  MX_VALUE=`expr $MEMORY_SIZE / 2`
59068  if test "$JVM_64BIT" = true; then
59069    # Set ms lower than mx since more than one instance of the server might
59070    # get launched at the same time before they figure out which instance won.
59071    MS_VALUE=512
59072    if test "$MX_VALUE" -gt "2048"; then
59073      MX_VALUE=2048
59074    fi
59075  else
59076    MS_VALUE=256
59077    if test "$MX_VALUE" -gt "1500"; then
59078      MX_VALUE=1500
59079    fi
59080  fi
59081  if test "$MX_VALUE" -lt "512"; then
59082    MX_VALUE=512
59083  fi
59084
59085  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
59086  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
59087  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
59088  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59089  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59090  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59091    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
59092    JVM_ARG_OK=true
59093  else
59094    $ECHO "Arg failed:" >&5
59095    $ECHO "$OUTPUT" >&5
59096    JVM_ARG_OK=false
59097  fi
59098
59099
59100
59101  # Check whether --enable-sjavac was given.
59102if test "${enable_sjavac+set}" = set; then :
59103  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
59104else
59105  ENABLE_SJAVAC="no"
59106fi
59107
59108  if test "x$JVM_ARG_OK" = "xfalse"; then
59109    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
59110$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
59111    ENABLE_SJAVAC="no"
59112  fi
59113  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
59114$as_echo_n "checking whether to use sjavac... " >&6; }
59115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
59116$as_echo "$ENABLE_SJAVAC" >&6; }
59117
59118
59119  # Check whether --enable-javac-server was given.
59120if test "${enable_javac_server+set}" = set; then :
59121  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
59122else
59123  ENABLE_JAVAC_SERVER="yes"
59124fi
59125
59126  if test "x$JVM_ARG_OK" = "xfalse"; then
59127    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
59128$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
59129    ENABLE_JAVAC_SERVER="no"
59130  fi
59131  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
59132$as_echo_n "checking whether to use javac server... " >&6; }
59133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
59134$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
59135
59136
59137  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
59138    # When using a server javac, the small client instances do not need much
59139    # resources.
59140    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
59141  fi
59142
59143
59144# Setup use of icecc if requested
59145
59146  # Check whether --enable-icecc was given.
59147if test "${enable_icecc+set}" = set; then :
59148  enableval=$enable_icecc;
59149fi
59150
59151
59152  if test "x${enable_icecc}" = "xyes"; then
59153
59154
59155
59156  # Publish this variable in the help.
59157
59158
59159  if [ -z "${ICECC_CMD+x}" ]; then
59160    # The variable is not set by user, try to locate tool using the code snippet
59161    for ac_prog in icecc
59162do
59163  # Extract the first word of "$ac_prog", so it can be a program name with args.
59164set dummy $ac_prog; ac_word=$2
59165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59166$as_echo_n "checking for $ac_word... " >&6; }
59167if ${ac_cv_path_ICECC_CMD+:} false; then :
59168  $as_echo_n "(cached) " >&6
59169else
59170  case $ICECC_CMD in
59171  [\\/]* | ?:[\\/]*)
59172  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59173  ;;
59174  *)
59175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59176for as_dir in $PATH
59177do
59178  IFS=$as_save_IFS
59179  test -z "$as_dir" && as_dir=.
59180    for ac_exec_ext in '' $ac_executable_extensions; do
59181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59182    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59184    break 2
59185  fi
59186done
59187  done
59188IFS=$as_save_IFS
59189
59190  ;;
59191esac
59192fi
59193ICECC_CMD=$ac_cv_path_ICECC_CMD
59194if test -n "$ICECC_CMD"; then
59195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59196$as_echo "$ICECC_CMD" >&6; }
59197else
59198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59199$as_echo "no" >&6; }
59200fi
59201
59202
59203  test -n "$ICECC_CMD" && break
59204done
59205
59206  else
59207    # The variable is set, but is it from the command line or the environment?
59208
59209    # Try to remove the string !ICECC_CMD! from our list.
59210    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
59211    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59212      # If it failed, the variable was not from the command line. Ignore it,
59213      # but warn the user (except for BASH, which is always set by the calling BASH).
59214      if test "xICECC_CMD" != xBASH; then
59215        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
59216$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
59217      fi
59218      # Try to locate tool using the code snippet
59219      for ac_prog in icecc
59220do
59221  # Extract the first word of "$ac_prog", so it can be a program name with args.
59222set dummy $ac_prog; ac_word=$2
59223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59224$as_echo_n "checking for $ac_word... " >&6; }
59225if ${ac_cv_path_ICECC_CMD+:} false; then :
59226  $as_echo_n "(cached) " >&6
59227else
59228  case $ICECC_CMD in
59229  [\\/]* | ?:[\\/]*)
59230  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59231  ;;
59232  *)
59233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59234for as_dir in $PATH
59235do
59236  IFS=$as_save_IFS
59237  test -z "$as_dir" && as_dir=.
59238    for ac_exec_ext in '' $ac_executable_extensions; do
59239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59240    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59242    break 2
59243  fi
59244done
59245  done
59246IFS=$as_save_IFS
59247
59248  ;;
59249esac
59250fi
59251ICECC_CMD=$ac_cv_path_ICECC_CMD
59252if test -n "$ICECC_CMD"; then
59253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59254$as_echo "$ICECC_CMD" >&6; }
59255else
59256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59257$as_echo "no" >&6; }
59258fi
59259
59260
59261  test -n "$ICECC_CMD" && break
59262done
59263
59264    else
59265      # If it succeeded, then it was overridden by the user. We will use it
59266      # for the tool.
59267
59268      # First remove it from the list of overridden variables, so we can test
59269      # for unknown variables in the end.
59270      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59271
59272      # Check if we try to supply an empty value
59273      if test "x$ICECC_CMD" = x; then
59274        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
59275$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
59276        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
59277$as_echo_n "checking for ICECC_CMD... " >&6; }
59278        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59279$as_echo "disabled" >&6; }
59280      else
59281        # Check if the provided tool contains a complete path.
59282        tool_specified="$ICECC_CMD"
59283        tool_basename="${tool_specified##*/}"
59284        if test "x$tool_basename" = "x$tool_specified"; then
59285          # A command without a complete path is provided, search $PATH.
59286          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
59287$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
59288          # Extract the first word of "$tool_basename", so it can be a program name with args.
59289set dummy $tool_basename; ac_word=$2
59290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59291$as_echo_n "checking for $ac_word... " >&6; }
59292if ${ac_cv_path_ICECC_CMD+:} false; then :
59293  $as_echo_n "(cached) " >&6
59294else
59295  case $ICECC_CMD in
59296  [\\/]* | ?:[\\/]*)
59297  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59298  ;;
59299  *)
59300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59301for as_dir in $PATH
59302do
59303  IFS=$as_save_IFS
59304  test -z "$as_dir" && as_dir=.
59305    for ac_exec_ext in '' $ac_executable_extensions; do
59306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59307    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59309    break 2
59310  fi
59311done
59312  done
59313IFS=$as_save_IFS
59314
59315  ;;
59316esac
59317fi
59318ICECC_CMD=$ac_cv_path_ICECC_CMD
59319if test -n "$ICECC_CMD"; then
59320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59321$as_echo "$ICECC_CMD" >&6; }
59322else
59323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59324$as_echo "no" >&6; }
59325fi
59326
59327
59328          if test "x$ICECC_CMD" = x; then
59329            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59330          fi
59331        else
59332          # Otherwise we believe it is a complete path. Use it as it is.
59333          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
59334$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
59335          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
59336$as_echo_n "checking for ICECC_CMD... " >&6; }
59337          if test ! -x "$tool_specified"; then
59338            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59339$as_echo "not found" >&6; }
59340            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
59341          fi
59342          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59343$as_echo "$tool_specified" >&6; }
59344        fi
59345      fi
59346    fi
59347
59348  fi
59349
59350
59351
59352  if test "x$ICECC_CMD" = x; then
59353    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
59354  fi
59355
59356
59357    old_path="$PATH"
59358
59359    # Look for icecc-create-env in some known places
59360    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
59361
59362
59363
59364  # Publish this variable in the help.
59365
59366
59367  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
59368    # The variable is not set by user, try to locate tool using the code snippet
59369    for ac_prog in icecc-create-env
59370do
59371  # Extract the first word of "$ac_prog", so it can be a program name with args.
59372set dummy $ac_prog; ac_word=$2
59373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59374$as_echo_n "checking for $ac_word... " >&6; }
59375if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59376  $as_echo_n "(cached) " >&6
59377else
59378  case $ICECC_CREATE_ENV in
59379  [\\/]* | ?:[\\/]*)
59380  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59381  ;;
59382  *)
59383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59384for as_dir in $PATH
59385do
59386  IFS=$as_save_IFS
59387  test -z "$as_dir" && as_dir=.
59388    for ac_exec_ext in '' $ac_executable_extensions; do
59389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59390    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59392    break 2
59393  fi
59394done
59395  done
59396IFS=$as_save_IFS
59397
59398  ;;
59399esac
59400fi
59401ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59402if test -n "$ICECC_CREATE_ENV"; then
59403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59404$as_echo "$ICECC_CREATE_ENV" >&6; }
59405else
59406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59407$as_echo "no" >&6; }
59408fi
59409
59410
59411  test -n "$ICECC_CREATE_ENV" && break
59412done
59413
59414  else
59415    # The variable is set, but is it from the command line or the environment?
59416
59417    # Try to remove the string !ICECC_CREATE_ENV! from our list.
59418    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
59419    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59420      # If it failed, the variable was not from the command line. Ignore it,
59421      # but warn the user (except for BASH, which is always set by the calling BASH).
59422      if test "xICECC_CREATE_ENV" != xBASH; then
59423        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
59424$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
59425      fi
59426      # Try to locate tool using the code snippet
59427      for ac_prog in icecc-create-env
59428do
59429  # Extract the first word of "$ac_prog", so it can be a program name with args.
59430set dummy $ac_prog; ac_word=$2
59431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59432$as_echo_n "checking for $ac_word... " >&6; }
59433if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59434  $as_echo_n "(cached) " >&6
59435else
59436  case $ICECC_CREATE_ENV in
59437  [\\/]* | ?:[\\/]*)
59438  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59439  ;;
59440  *)
59441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59442for as_dir in $PATH
59443do
59444  IFS=$as_save_IFS
59445  test -z "$as_dir" && as_dir=.
59446    for ac_exec_ext in '' $ac_executable_extensions; do
59447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59448    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59450    break 2
59451  fi
59452done
59453  done
59454IFS=$as_save_IFS
59455
59456  ;;
59457esac
59458fi
59459ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59460if test -n "$ICECC_CREATE_ENV"; then
59461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59462$as_echo "$ICECC_CREATE_ENV" >&6; }
59463else
59464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59465$as_echo "no" >&6; }
59466fi
59467
59468
59469  test -n "$ICECC_CREATE_ENV" && break
59470done
59471
59472    else
59473      # If it succeeded, then it was overridden by the user. We will use it
59474      # for the tool.
59475
59476      # First remove it from the list of overridden variables, so we can test
59477      # for unknown variables in the end.
59478      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59479
59480      # Check if we try to supply an empty value
59481      if test "x$ICECC_CREATE_ENV" = x; then
59482        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
59483$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
59484        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
59485$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
59486        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59487$as_echo "disabled" >&6; }
59488      else
59489        # Check if the provided tool contains a complete path.
59490        tool_specified="$ICECC_CREATE_ENV"
59491        tool_basename="${tool_specified##*/}"
59492        if test "x$tool_basename" = "x$tool_specified"; then
59493          # A command without a complete path is provided, search $PATH.
59494          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
59495$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
59496          # Extract the first word of "$tool_basename", so it can be a program name with args.
59497set dummy $tool_basename; ac_word=$2
59498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59499$as_echo_n "checking for $ac_word... " >&6; }
59500if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59501  $as_echo_n "(cached) " >&6
59502else
59503  case $ICECC_CREATE_ENV in
59504  [\\/]* | ?:[\\/]*)
59505  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59506  ;;
59507  *)
59508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59509for as_dir in $PATH
59510do
59511  IFS=$as_save_IFS
59512  test -z "$as_dir" && as_dir=.
59513    for ac_exec_ext in '' $ac_executable_extensions; do
59514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59515    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59517    break 2
59518  fi
59519done
59520  done
59521IFS=$as_save_IFS
59522
59523  ;;
59524esac
59525fi
59526ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59527if test -n "$ICECC_CREATE_ENV"; then
59528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59529$as_echo "$ICECC_CREATE_ENV" >&6; }
59530else
59531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59532$as_echo "no" >&6; }
59533fi
59534
59535
59536          if test "x$ICECC_CREATE_ENV" = x; then
59537            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59538          fi
59539        else
59540          # Otherwise we believe it is a complete path. Use it as it is.
59541          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
59542$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
59543          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
59544$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
59545          if test ! -x "$tool_specified"; then
59546            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59547$as_echo "not found" >&6; }
59548            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
59549          fi
59550          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59551$as_echo "$tool_specified" >&6; }
59552        fi
59553      fi
59554    fi
59555
59556  fi
59557
59558
59559
59560  if test "x$ICECC_CREATE_ENV" = x; then
59561    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
59562  fi
59563
59564
59565    # Use icecc-create-env to create a minimal compilation environment that can
59566    # be sent to the other hosts in the icecream cluster.
59567    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
59568    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
59569    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
59570$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
59571    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
59572      cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59573          && ${ICECC_CREATE_ENV} --gcc ${CC} ${CXX} > ${icecc_create_env_log}
59574    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
59575      # For clang, the icecc compilerwrapper is needed. It usually resides next
59576      # to icecc-create-env.
59577
59578
59579
59580  # Publish this variable in the help.
59581
59582
59583  if [ -z "${ICECC_WRAPPER+x}" ]; then
59584    # The variable is not set by user, try to locate tool using the code snippet
59585    for ac_prog in compilerwrapper
59586do
59587  # Extract the first word of "$ac_prog", so it can be a program name with args.
59588set dummy $ac_prog; ac_word=$2
59589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59590$as_echo_n "checking for $ac_word... " >&6; }
59591if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59592  $as_echo_n "(cached) " >&6
59593else
59594  case $ICECC_WRAPPER in
59595  [\\/]* | ?:[\\/]*)
59596  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59597  ;;
59598  *)
59599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59600for as_dir in $PATH
59601do
59602  IFS=$as_save_IFS
59603  test -z "$as_dir" && as_dir=.
59604    for ac_exec_ext in '' $ac_executable_extensions; do
59605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59606    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59608    break 2
59609  fi
59610done
59611  done
59612IFS=$as_save_IFS
59613
59614  ;;
59615esac
59616fi
59617ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59618if test -n "$ICECC_WRAPPER"; then
59619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59620$as_echo "$ICECC_WRAPPER" >&6; }
59621else
59622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59623$as_echo "no" >&6; }
59624fi
59625
59626
59627  test -n "$ICECC_WRAPPER" && break
59628done
59629
59630  else
59631    # The variable is set, but is it from the command line or the environment?
59632
59633    # Try to remove the string !ICECC_WRAPPER! from our list.
59634    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
59635    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59636      # If it failed, the variable was not from the command line. Ignore it,
59637      # but warn the user (except for BASH, which is always set by the calling BASH).
59638      if test "xICECC_WRAPPER" != xBASH; then
59639        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
59640$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
59641      fi
59642      # Try to locate tool using the code snippet
59643      for ac_prog in compilerwrapper
59644do
59645  # Extract the first word of "$ac_prog", so it can be a program name with args.
59646set dummy $ac_prog; ac_word=$2
59647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59648$as_echo_n "checking for $ac_word... " >&6; }
59649if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59650  $as_echo_n "(cached) " >&6
59651else
59652  case $ICECC_WRAPPER in
59653  [\\/]* | ?:[\\/]*)
59654  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59655  ;;
59656  *)
59657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59658for as_dir in $PATH
59659do
59660  IFS=$as_save_IFS
59661  test -z "$as_dir" && as_dir=.
59662    for ac_exec_ext in '' $ac_executable_extensions; do
59663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59664    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59666    break 2
59667  fi
59668done
59669  done
59670IFS=$as_save_IFS
59671
59672  ;;
59673esac
59674fi
59675ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59676if test -n "$ICECC_WRAPPER"; then
59677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59678$as_echo "$ICECC_WRAPPER" >&6; }
59679else
59680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59681$as_echo "no" >&6; }
59682fi
59683
59684
59685  test -n "$ICECC_WRAPPER" && break
59686done
59687
59688    else
59689      # If it succeeded, then it was overridden by the user. We will use it
59690      # for the tool.
59691
59692      # First remove it from the list of overridden variables, so we can test
59693      # for unknown variables in the end.
59694      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59695
59696      # Check if we try to supply an empty value
59697      if test "x$ICECC_WRAPPER" = x; then
59698        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
59699$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
59700        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
59701$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
59702        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59703$as_echo "disabled" >&6; }
59704      else
59705        # Check if the provided tool contains a complete path.
59706        tool_specified="$ICECC_WRAPPER"
59707        tool_basename="${tool_specified##*/}"
59708        if test "x$tool_basename" = "x$tool_specified"; then
59709          # A command without a complete path is provided, search $PATH.
59710          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
59711$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
59712          # Extract the first word of "$tool_basename", so it can be a program name with args.
59713set dummy $tool_basename; ac_word=$2
59714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59715$as_echo_n "checking for $ac_word... " >&6; }
59716if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59717  $as_echo_n "(cached) " >&6
59718else
59719  case $ICECC_WRAPPER in
59720  [\\/]* | ?:[\\/]*)
59721  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59722  ;;
59723  *)
59724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59725for as_dir in $PATH
59726do
59727  IFS=$as_save_IFS
59728  test -z "$as_dir" && as_dir=.
59729    for ac_exec_ext in '' $ac_executable_extensions; do
59730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59731    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59733    break 2
59734  fi
59735done
59736  done
59737IFS=$as_save_IFS
59738
59739  ;;
59740esac
59741fi
59742ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59743if test -n "$ICECC_WRAPPER"; then
59744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59745$as_echo "$ICECC_WRAPPER" >&6; }
59746else
59747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59748$as_echo "no" >&6; }
59749fi
59750
59751
59752          if test "x$ICECC_WRAPPER" = x; then
59753            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59754          fi
59755        else
59756          # Otherwise we believe it is a complete path. Use it as it is.
59757          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
59758$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
59759          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
59760$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
59761          if test ! -x "$tool_specified"; then
59762            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59763$as_echo "not found" >&6; }
59764            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
59765          fi
59766          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59767$as_echo "$tool_specified" >&6; }
59768        fi
59769      fi
59770    fi
59771
59772  fi
59773
59774
59775
59776  if test "x$ICECC_WRAPPER" = x; then
59777    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
59778  fi
59779
59780
59781      cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59782          && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
59783    else
59784      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
59785    fi
59786    PATH="$old_path"
59787    # The bundle with the compiler gets a name based on checksums. Parse log file
59788    # to find it.
59789    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
59790    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
59791    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
59792$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
59793    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
59794
59795    if test "x${COMPILE_TYPE}" = "xcross"; then
59796      # If cross compiling, create a separate env package for the build compiler
59797      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
59798$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
59799      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
59800      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
59801        cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59802            && ${ICECC_CREATE_ENV} --gcc ${BUILD_CC} ${BUILD_CXX} > ${icecc_create_env_log}
59803      elif test "x${BUILD_CC##*/}" = "xclang"; then
59804        cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59805            && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
59806      else
59807        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
59808      fi
59809      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
59810      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
59811      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
59812$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
59813      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
59814          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
59815    else
59816      BUILD_ICECC="${ICECC}"
59817    fi
59818
59819
59820  fi
59821
59822
59823# Can the C/C++ compiler use precompiled headers?
59824
59825
59826  ###############################################################################
59827  #
59828  # Can the C/C++ compiler use precompiled headers?
59829  #
59830  # Check whether --enable-precompiled-headers was given.
59831if test "${enable_precompiled_headers+set}" = set; then :
59832  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
59833else
59834  ENABLE_PRECOMPH=yes
59835fi
59836
59837
59838  USE_PRECOMPILED_HEADER=1
59839  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
59840$as_echo_n "checking If precompiled header is enabled... " >&6; }
59841  if test "x$ENABLE_PRECOMPH" = xno; then
59842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
59843$as_echo "no, forced" >&6; }
59844    USE_PRECOMPILED_HEADER=0
59845  elif test "x$ICECC" != "x"; then
59846    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
59847$as_echo "no, does not work effectively with icecc" >&6; }
59848    USE_PRECOMPILED_HEADER=0
59849  else
59850    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59851$as_echo "yes" >&6; }
59852  fi
59853
59854  if test "x$ENABLE_PRECOMPH" = xyes; then
59855    # Check that the compiler actually supports precomp headers.
59856    if test "x$TOOLCHAIN_TYPE" = xgcc; then
59857      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
59858$as_echo_n "checking that precompiled headers work... " >&6; }
59859      echo "int alfa();" > conftest.h
59860      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
59861      if test ! -f conftest.hpp.gch; then
59862        USE_PRECOMPILED_HEADER=0
59863        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59864$as_echo "no" >&6; }
59865      else
59866        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59867$as_echo "yes" >&6; }
59868      fi
59869      rm -f conftest.h conftest.hpp.gch
59870    fi
59871  fi
59872
59873
59874
59875
59876# Setup use of ccache, if available
59877
59878  # Check whether --enable-ccache was given.
59879if test "${enable_ccache+set}" = set; then :
59880  enableval=$enable_ccache;
59881fi
59882
59883
59884  CCACHE=
59885  CCACHE_STATUS=
59886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
59887$as_echo_n "checking is ccache enabled... " >&6; }
59888  if test "x$enable_ccache" = xyes; then
59889    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
59890      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59891$as_echo "yes" >&6; }
59892      OLD_PATH="$PATH"
59893      if test "x$TOOLCHAIN_PATH" != x; then
59894        PATH=$TOOLCHAIN_PATH:$PATH
59895      fi
59896
59897
59898
59899  # Publish this variable in the help.
59900
59901
59902  if [ -z "${CCACHE+x}" ]; then
59903    # The variable is not set by user, try to locate tool using the code snippet
59904    for ac_prog in ccache
59905do
59906  # Extract the first word of "$ac_prog", so it can be a program name with args.
59907set dummy $ac_prog; ac_word=$2
59908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59909$as_echo_n "checking for $ac_word... " >&6; }
59910if ${ac_cv_path_CCACHE+:} false; then :
59911  $as_echo_n "(cached) " >&6
59912else
59913  case $CCACHE in
59914  [\\/]* | ?:[\\/]*)
59915  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
59916  ;;
59917  *)
59918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59919for as_dir in $PATH
59920do
59921  IFS=$as_save_IFS
59922  test -z "$as_dir" && as_dir=.
59923    for ac_exec_ext in '' $ac_executable_extensions; do
59924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59925    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
59926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59927    break 2
59928  fi
59929done
59930  done
59931IFS=$as_save_IFS
59932
59933  ;;
59934esac
59935fi
59936CCACHE=$ac_cv_path_CCACHE
59937if test -n "$CCACHE"; then
59938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
59939$as_echo "$CCACHE" >&6; }
59940else
59941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59942$as_echo "no" >&6; }
59943fi
59944
59945
59946  test -n "$CCACHE" && break
59947done
59948
59949  else
59950    # The variable is set, but is it from the command line or the environment?
59951
59952    # Try to remove the string !CCACHE! from our list.
59953    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
59954    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59955      # If it failed, the variable was not from the command line. Ignore it,
59956      # but warn the user (except for BASH, which is always set by the calling BASH).
59957      if test "xCCACHE" != xBASH; then
59958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
59959$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
59960      fi
59961      # Try to locate tool using the code snippet
59962      for ac_prog in ccache
59963do
59964  # Extract the first word of "$ac_prog", so it can be a program name with args.
59965set dummy $ac_prog; ac_word=$2
59966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59967$as_echo_n "checking for $ac_word... " >&6; }
59968if ${ac_cv_path_CCACHE+:} false; then :
59969  $as_echo_n "(cached) " >&6
59970else
59971  case $CCACHE in
59972  [\\/]* | ?:[\\/]*)
59973  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
59974  ;;
59975  *)
59976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59977for as_dir in $PATH
59978do
59979  IFS=$as_save_IFS
59980  test -z "$as_dir" && as_dir=.
59981    for ac_exec_ext in '' $ac_executable_extensions; do
59982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59983    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
59984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59985    break 2
59986  fi
59987done
59988  done
59989IFS=$as_save_IFS
59990
59991  ;;
59992esac
59993fi
59994CCACHE=$ac_cv_path_CCACHE
59995if test -n "$CCACHE"; then
59996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
59997$as_echo "$CCACHE" >&6; }
59998else
59999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60000$as_echo "no" >&6; }
60001fi
60002
60003
60004  test -n "$CCACHE" && break
60005done
60006
60007    else
60008      # If it succeeded, then it was overridden by the user. We will use it
60009      # for the tool.
60010
60011      # First remove it from the list of overridden variables, so we can test
60012      # for unknown variables in the end.
60013      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
60014
60015      # Check if we try to supply an empty value
60016      if test "x$CCACHE" = x; then
60017        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
60018$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
60019        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
60020$as_echo_n "checking for CCACHE... " >&6; }
60021        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
60022$as_echo "disabled" >&6; }
60023      else
60024        # Check if the provided tool contains a complete path.
60025        tool_specified="$CCACHE"
60026        tool_basename="${tool_specified##*/}"
60027        if test "x$tool_basename" = "x$tool_specified"; then
60028          # A command without a complete path is provided, search $PATH.
60029          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
60030$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
60031          # Extract the first word of "$tool_basename", so it can be a program name with args.
60032set dummy $tool_basename; ac_word=$2
60033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60034$as_echo_n "checking for $ac_word... " >&6; }
60035if ${ac_cv_path_CCACHE+:} false; then :
60036  $as_echo_n "(cached) " >&6
60037else
60038  case $CCACHE in
60039  [\\/]* | ?:[\\/]*)
60040  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
60041  ;;
60042  *)
60043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60044for as_dir in $PATH
60045do
60046  IFS=$as_save_IFS
60047  test -z "$as_dir" && as_dir=.
60048    for ac_exec_ext in '' $ac_executable_extensions; do
60049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60050    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
60051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60052    break 2
60053  fi
60054done
60055  done
60056IFS=$as_save_IFS
60057
60058  ;;
60059esac
60060fi
60061CCACHE=$ac_cv_path_CCACHE
60062if test -n "$CCACHE"; then
60063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
60064$as_echo "$CCACHE" >&6; }
60065else
60066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60067$as_echo "no" >&6; }
60068fi
60069
60070
60071          if test "x$CCACHE" = x; then
60072            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
60073          fi
60074        else
60075          # Otherwise we believe it is a complete path. Use it as it is.
60076          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
60077$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
60078          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
60079$as_echo_n "checking for CCACHE... " >&6; }
60080          if test ! -x "$tool_specified"; then
60081            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
60082$as_echo "not found" >&6; }
60083            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
60084          fi
60085          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
60086$as_echo "$tool_specified" >&6; }
60087        fi
60088      fi
60089    fi
60090
60091  fi
60092
60093
60094
60095  if test "x$CCACHE" = x; then
60096    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
60097  fi
60098
60099
60100      PATH="$OLD_PATH"
60101      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
60102      CCACHE_STATUS="Active ($CCACHE_VERSION)"
60103    else
60104      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60105$as_echo "no" >&6; }
60106      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
60107$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
60108    fi
60109  elif test "x$enable_ccache" = xno; then
60110    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
60111$as_echo "no, explicitly disabled" >&6; }
60112    CCACHE_STATUS="Disabled"
60113  elif test "x$enable_ccache" = x; then
60114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60115$as_echo "no" >&6; }
60116  else
60117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
60118$as_echo "unknown" >&6; }
60119    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
60120  fi
60121
60122
60123
60124# Check whether --with-ccache-dir was given.
60125if test "${with_ccache_dir+set}" = set; then :
60126  withval=$with_ccache_dir;
60127fi
60128
60129
60130  if test "x$with_ccache_dir" != x; then
60131    # When using a non home ccache directory, assume the use is to share ccache files
60132    # with other users. Thus change the umask.
60133    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
60134    if test "x$CCACHE" = x; then
60135      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
60136$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
60137    fi
60138  fi
60139
60140  if test "x$CCACHE" != x; then
60141
60142  if test "x$CCACHE" != x; then
60143    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
60144      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
60145          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
60146      if test "x$HAS_BAD_CCACHE" != "x"; then
60147        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
60148      fi
60149      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
60150$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
60151      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
60152      PUSHED_FLAGS="$CXXFLAGS"
60153      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
60154      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60155/* end confdefs.h.  */
60156
60157int
60158main ()
60159{
60160
60161  ;
60162  return 0;
60163}
60164_ACEOF
60165if ac_fn_cxx_try_compile "$LINENO"; then :
60166  CC_KNOWS_CCACHE_TRICK=yes
60167else
60168  CC_KNOWS_CCACHE_TRICK=no
60169fi
60170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
60171      CXXFLAGS="$PUSHED_FLAGS"
60172      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
60173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60174$as_echo "yes" >&6; }
60175        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
60176
60177        CCACHE_SLOPPINESS=pch_defines,time_macros
60178      else
60179        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60180$as_echo "no" >&6; }
60181        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
60182      fi
60183    fi
60184
60185    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
60186        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
60187
60188    if test "x$SET_CCACHE_DIR" != x; then
60189      mkdir -p $CCACHE_DIR > /dev/null 2>&1
60190      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
60191    fi
60192  fi
60193
60194  fi
60195
60196
60197###############################################################################
60198#
60199# And now the finish...
60200#
60201###############################################################################
60202
60203# Check for some common pitfalls
60204
60205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60206    file_to_test="$SRC_ROOT/LICENSE"
60207    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
60208      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
60209    fi
60210  fi
60211
60212
60213  # Did user specify any unknown variables?
60214
60215  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
60216    # Replace the separating ! with spaces before presenting for end user.
60217    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
60218    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
60219$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
60220  fi
60221
60222
60223  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
60224$as_echo_n "checking if build directory is on local disk... " >&6; }
60225
60226  # df -l lists only local disks; if the given directory is not found then
60227  # a non-zero exit code is given
60228  if test "x$DF" = x; then
60229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60230      # msys does not have df; use Windows "net use" instead.
60231      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
60232      if test "x$IS_NETWORK_DISK" = x; then
60233        OUTPUT_DIR_IS_LOCAL="yes"
60234      else
60235        OUTPUT_DIR_IS_LOCAL="no"
60236      fi
60237    else
60238      # No df here, say it's local
60239      OUTPUT_DIR_IS_LOCAL="yes"
60240    fi
60241  else
60242    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
60243      OUTPUT_DIR_IS_LOCAL="yes"
60244    else
60245      OUTPUT_DIR_IS_LOCAL="no"
60246    fi
60247  fi
60248
60249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
60250$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
60251
60252
60253
60254  # Check if the user has any old-style ALT_ variables set.
60255  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
60256
60257  # Before generating output files, test if they exist. If they do, this is a reconfigure.
60258  # Since we can't properly handle the dependencies for this, warn the user about the situation
60259  if test -e $OUTPUT_ROOT/spec.gmk; then
60260    IS_RECONFIGURE=yes
60261  else
60262    IS_RECONFIGURE=no
60263  fi
60264
60265
60266# At the end, call the custom hook. (Dummy macro if no custom sources available)
60267
60268
60269# We're messing a bit with internal autoconf variables to put the config.status
60270# in the output directory instead of the current directory.
60271CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
60272
60273# Create the actual output files. Now the main work of configure is done.
60274cat >confcache <<\_ACEOF
60275# This file is a shell script that caches the results of configure
60276# tests run on this system so they can be shared between configure
60277# scripts and configure runs, see configure's option --config-cache.
60278# It is not useful on other systems.  If it contains results you don't
60279# want to keep, you may remove or edit it.
60280#
60281# config.status only pays attention to the cache file if you give it
60282# the --recheck option to rerun configure.
60283#
60284# `ac_cv_env_foo' variables (set or unset) will be overridden when
60285# loading this file, other *unset* `ac_cv_foo' will be assigned the
60286# following values.
60287
60288_ACEOF
60289
60290# The following way of writing the cache mishandles newlines in values,
60291# but we know of no workaround that is simple, portable, and efficient.
60292# So, we kill variables containing newlines.
60293# Ultrix sh set writes to stderr and can't be redirected directly,
60294# and sets the high bit in the cache file unless we assign to the vars.
60295(
60296  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
60297    eval ac_val=\$$ac_var
60298    case $ac_val in #(
60299    *${as_nl}*)
60300      case $ac_var in #(
60301      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
60302$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
60303      esac
60304      case $ac_var in #(
60305      _ | IFS | as_nl) ;; #(
60306      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
60307      *) { eval $ac_var=; unset $ac_var;} ;;
60308      esac ;;
60309    esac
60310  done
60311
60312  (set) 2>&1 |
60313    case $as_nl`(ac_space=' '; set) 2>&1` in #(
60314    *${as_nl}ac_space=\ *)
60315      # `set' does not quote correctly, so add quotes: double-quote
60316      # substitution turns \\\\ into \\, and sed turns \\ into \.
60317      sed -n \
60318	"s/'/'\\\\''/g;
60319	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
60320      ;; #(
60321    *)
60322      # `set' quotes correctly as required by POSIX, so do not add quotes.
60323      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
60324      ;;
60325    esac |
60326    sort
60327) |
60328  sed '
60329     /^ac_cv_env_/b end
60330     t clear
60331     :clear
60332     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
60333     t end
60334     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
60335     :end' >>confcache
60336if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
60337  if test -w "$cache_file"; then
60338    if test "x$cache_file" != "x/dev/null"; then
60339      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
60340$as_echo "$as_me: updating cache $cache_file" >&6;}
60341      if test ! -f "$cache_file" || test -h "$cache_file"; then
60342	cat confcache >"$cache_file"
60343      else
60344        case $cache_file in #(
60345        */* | ?:*)
60346	  mv -f confcache "$cache_file"$$ &&
60347	  mv -f "$cache_file"$$ "$cache_file" ;; #(
60348        *)
60349	  mv -f confcache "$cache_file" ;;
60350	esac
60351      fi
60352    fi
60353  else
60354    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
60355$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
60356  fi
60357fi
60358rm -f confcache
60359
60360test "x$prefix" = xNONE && prefix=$ac_default_prefix
60361# Let make expand exec_prefix.
60362test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
60363
60364# Transform confdefs.h into DEFS.
60365# Protect against shell expansion while executing Makefile rules.
60366# Protect against Makefile macro expansion.
60367#
60368# If the first sed substitution is executed (which looks for macros that
60369# take arguments), then branch to the quote section.  Otherwise,
60370# look for a macro that doesn't take arguments.
60371ac_script='
60372:mline
60373/\\$/{
60374 N
60375 s,\\\n,,
60376 b mline
60377}
60378t clear
60379:clear
60380s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
60381t quote
60382s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
60383t quote
60384b any
60385:quote
60386s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
60387s/\[/\\&/g
60388s/\]/\\&/g
60389s/\$/$$/g
60390H
60391:any
60392${
60393	g
60394	s/^\n//
60395	s/\n/ /g
60396	p
60397}
60398'
60399DEFS=`sed -n "$ac_script" confdefs.h`
60400
60401
60402ac_libobjs=
60403ac_ltlibobjs=
60404U=
60405for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
60406  # 1. Remove the extension, and $U if already installed.
60407  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
60408  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
60409  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
60410  #    will be set to the directory where LIBOBJS objects are built.
60411  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
60412  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
60413done
60414LIBOBJS=$ac_libobjs
60415
60416LTLIBOBJS=$ac_ltlibobjs
60417
60418
60419
60420: "${CONFIG_STATUS=./config.status}"
60421ac_write_fail=0
60422ac_clean_files_save=$ac_clean_files
60423ac_clean_files="$ac_clean_files $CONFIG_STATUS"
60424{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
60425$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
60426as_write_fail=0
60427cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
60428#! $SHELL
60429# Generated by $as_me.
60430# Run this file to recreate the current configuration.
60431# Compiler output produced by configure, useful for debugging
60432# configure, is in config.log if it exists.
60433
60434debug=false
60435ac_cs_recheck=false
60436ac_cs_silent=false
60437
60438SHELL=\${CONFIG_SHELL-$SHELL}
60439export SHELL
60440_ASEOF
60441cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
60442## -------------------- ##
60443## M4sh Initialization. ##
60444## -------------------- ##
60445
60446# Be more Bourne compatible
60447DUALCASE=1; export DUALCASE # for MKS sh
60448if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
60449  emulate sh
60450  NULLCMD=:
60451  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
60452  # is contrary to our usage.  Disable this feature.
60453  alias -g '${1+"$@"}'='"$@"'
60454  setopt NO_GLOB_SUBST
60455else
60456  case `(set -o) 2>/dev/null` in #(
60457  *posix*) :
60458    set -o posix ;; #(
60459  *) :
60460     ;;
60461esac
60462fi
60463
60464
60465as_nl='
60466'
60467export as_nl
60468# Printing a long string crashes Solaris 7 /usr/bin/printf.
60469as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
60470as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
60471as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
60472# Prefer a ksh shell builtin over an external printf program on Solaris,
60473# but without wasting forks for bash or zsh.
60474if test -z "$BASH_VERSION$ZSH_VERSION" \
60475    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
60476  as_echo='print -r --'
60477  as_echo_n='print -rn --'
60478elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
60479  as_echo='printf %s\n'
60480  as_echo_n='printf %s'
60481else
60482  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60483    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
60484    as_echo_n='/usr/ucb/echo -n'
60485  else
60486    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60487    as_echo_n_body='eval
60488      arg=$1;
60489      case $arg in #(
60490      *"$as_nl"*)
60491	expr "X$arg" : "X\\(.*\\)$as_nl";
60492	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
60493      esac;
60494      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
60495    '
60496    export as_echo_n_body
60497    as_echo_n='sh -c $as_echo_n_body as_echo'
60498  fi
60499  export as_echo_body
60500  as_echo='sh -c $as_echo_body as_echo'
60501fi
60502
60503# The user is always right.
60504if test "${PATH_SEPARATOR+set}" != set; then
60505  PATH_SEPARATOR=:
60506  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
60507    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
60508      PATH_SEPARATOR=';'
60509  }
60510fi
60511
60512
60513# IFS
60514# We need space, tab and new line, in precisely that order.  Quoting is
60515# there to prevent editors from complaining about space-tab.
60516# (If _AS_PATH_WALK were called with IFS unset, it would disable word
60517# splitting by setting IFS to empty value.)
60518IFS=" ""	$as_nl"
60519
60520# Find who we are.  Look in the path if we contain no directory separator.
60521as_myself=
60522case $0 in #((
60523  *[\\/]* ) as_myself=$0 ;;
60524  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60525for as_dir in $PATH
60526do
60527  IFS=$as_save_IFS
60528  test -z "$as_dir" && as_dir=.
60529    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
60530  done
60531IFS=$as_save_IFS
60532
60533     ;;
60534esac
60535# We did not find ourselves, most probably we were run as `sh COMMAND'
60536# in which case we are not to be found in the path.
60537if test "x$as_myself" = x; then
60538  as_myself=$0
60539fi
60540if test ! -f "$as_myself"; then
60541  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
60542  exit 1
60543fi
60544
60545# Unset variables that we do not need and which cause bugs (e.g. in
60546# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
60547# suppresses any "Segmentation fault" message there.  '((' could
60548# trigger a bug in pdksh 5.2.14.
60549for as_var in BASH_ENV ENV MAIL MAILPATH
60550do eval test x\${$as_var+set} = xset \
60551  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
60552done
60553PS1='$ '
60554PS2='> '
60555PS4='+ '
60556
60557# NLS nuisances.
60558LC_ALL=C
60559export LC_ALL
60560LANGUAGE=C
60561export LANGUAGE
60562
60563# CDPATH.
60564(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
60565
60566
60567# as_fn_error STATUS ERROR [LINENO LOG_FD]
60568# ----------------------------------------
60569# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
60570# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
60571# script with STATUS, using 1 if that was 0.
60572as_fn_error ()
60573{
60574  as_status=$1; test $as_status -eq 0 && as_status=1
60575  if test "$4"; then
60576    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
60577    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
60578  fi
60579  $as_echo "$as_me: error: $2" >&2
60580  as_fn_exit $as_status
60581} # as_fn_error
60582
60583
60584# as_fn_set_status STATUS
60585# -----------------------
60586# Set $? to STATUS, without forking.
60587as_fn_set_status ()
60588{
60589  return $1
60590} # as_fn_set_status
60591
60592# as_fn_exit STATUS
60593# -----------------
60594# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
60595as_fn_exit ()
60596{
60597  set +e
60598  as_fn_set_status $1
60599  exit $1
60600} # as_fn_exit
60601
60602# as_fn_unset VAR
60603# ---------------
60604# Portably unset VAR.
60605as_fn_unset ()
60606{
60607  { eval $1=; unset $1;}
60608}
60609as_unset=as_fn_unset
60610# as_fn_append VAR VALUE
60611# ----------------------
60612# Append the text in VALUE to the end of the definition contained in VAR. Take
60613# advantage of any shell optimizations that allow amortized linear growth over
60614# repeated appends, instead of the typical quadratic growth present in naive
60615# implementations.
60616if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
60617  eval 'as_fn_append ()
60618  {
60619    eval $1+=\$2
60620  }'
60621else
60622  as_fn_append ()
60623  {
60624    eval $1=\$$1\$2
60625  }
60626fi # as_fn_append
60627
60628# as_fn_arith ARG...
60629# ------------------
60630# Perform arithmetic evaluation on the ARGs, and store the result in the
60631# global $as_val. Take advantage of shells that can avoid forks. The arguments
60632# must be portable across $(()) and expr.
60633if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
60634  eval 'as_fn_arith ()
60635  {
60636    as_val=$(( $* ))
60637  }'
60638else
60639  as_fn_arith ()
60640  {
60641    as_val=`expr "$@" || test $? -eq 1`
60642  }
60643fi # as_fn_arith
60644
60645
60646if expr a : '\(a\)' >/dev/null 2>&1 &&
60647   test "X`expr 00001 : '.*\(...\)'`" = X001; then
60648  as_expr=expr
60649else
60650  as_expr=false
60651fi
60652
60653if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
60654  as_basename=basename
60655else
60656  as_basename=false
60657fi
60658
60659if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
60660  as_dirname=dirname
60661else
60662  as_dirname=false
60663fi
60664
60665as_me=`$as_basename -- "$0" ||
60666$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
60667	 X"$0" : 'X\(//\)$' \| \
60668	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
60669$as_echo X/"$0" |
60670    sed '/^.*\/\([^/][^/]*\)\/*$/{
60671	    s//\1/
60672	    q
60673	  }
60674	  /^X\/\(\/\/\)$/{
60675	    s//\1/
60676	    q
60677	  }
60678	  /^X\/\(\/\).*/{
60679	    s//\1/
60680	    q
60681	  }
60682	  s/.*/./; q'`
60683
60684# Avoid depending upon Character Ranges.
60685as_cr_letters='abcdefghijklmnopqrstuvwxyz'
60686as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
60687as_cr_Letters=$as_cr_letters$as_cr_LETTERS
60688as_cr_digits='0123456789'
60689as_cr_alnum=$as_cr_Letters$as_cr_digits
60690
60691ECHO_C= ECHO_N= ECHO_T=
60692case `echo -n x` in #(((((
60693-n*)
60694  case `echo 'xy\c'` in
60695  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
60696  xy)  ECHO_C='\c';;
60697  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
60698       ECHO_T='	';;
60699  esac;;
60700*)
60701  ECHO_N='-n';;
60702esac
60703
60704rm -f conf$$ conf$$.exe conf$$.file
60705if test -d conf$$.dir; then
60706  rm -f conf$$.dir/conf$$.file
60707else
60708  rm -f conf$$.dir
60709  mkdir conf$$.dir 2>/dev/null
60710fi
60711if (echo >conf$$.file) 2>/dev/null; then
60712  if ln -s conf$$.file conf$$ 2>/dev/null; then
60713    as_ln_s='ln -s'
60714    # ... but there are two gotchas:
60715    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
60716    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
60717    # In both cases, we have to default to `cp -pR'.
60718    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
60719      as_ln_s='cp -pR'
60720  elif ln conf$$.file conf$$ 2>/dev/null; then
60721    as_ln_s=ln
60722  else
60723    as_ln_s='cp -pR'
60724  fi
60725else
60726  as_ln_s='cp -pR'
60727fi
60728rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
60729rmdir conf$$.dir 2>/dev/null
60730
60731
60732# as_fn_mkdir_p
60733# -------------
60734# Create "$as_dir" as a directory, including parents if necessary.
60735as_fn_mkdir_p ()
60736{
60737
60738  case $as_dir in #(
60739  -*) as_dir=./$as_dir;;
60740  esac
60741  test -d "$as_dir" || eval $as_mkdir_p || {
60742    as_dirs=
60743    while :; do
60744      case $as_dir in #(
60745      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
60746      *) as_qdir=$as_dir;;
60747      esac
60748      as_dirs="'$as_qdir' $as_dirs"
60749      as_dir=`$as_dirname -- "$as_dir" ||
60750$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
60751	 X"$as_dir" : 'X\(//\)[^/]' \| \
60752	 X"$as_dir" : 'X\(//\)$' \| \
60753	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
60754$as_echo X"$as_dir" |
60755    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
60756	    s//\1/
60757	    q
60758	  }
60759	  /^X\(\/\/\)[^/].*/{
60760	    s//\1/
60761	    q
60762	  }
60763	  /^X\(\/\/\)$/{
60764	    s//\1/
60765	    q
60766	  }
60767	  /^X\(\/\).*/{
60768	    s//\1/
60769	    q
60770	  }
60771	  s/.*/./; q'`
60772      test -d "$as_dir" && break
60773    done
60774    test -z "$as_dirs" || eval "mkdir $as_dirs"
60775  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
60776
60777
60778} # as_fn_mkdir_p
60779if mkdir -p . 2>/dev/null; then
60780  as_mkdir_p='mkdir -p "$as_dir"'
60781else
60782  test -d ./-p && rmdir ./-p
60783  as_mkdir_p=false
60784fi
60785
60786
60787# as_fn_executable_p FILE
60788# -----------------------
60789# Test if FILE is an executable regular file.
60790as_fn_executable_p ()
60791{
60792  test -f "$1" && test -x "$1"
60793} # as_fn_executable_p
60794as_test_x='test -x'
60795as_executable_p=as_fn_executable_p
60796
60797# Sed expression to map a string onto a valid CPP name.
60798as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
60799
60800# Sed expression to map a string onto a valid variable name.
60801as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
60802
60803
60804exec 6>&1
60805## ----------------------------------- ##
60806## Main body of $CONFIG_STATUS script. ##
60807## ----------------------------------- ##
60808_ASEOF
60809test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
60810
60811cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60812# Save the log message, to keep $0 and so on meaningful, and to
60813# report actual input values of CONFIG_FILES etc. instead of their
60814# values after options handling.
60815ac_log="
60816This file was extended by OpenJDK $as_me jdk9, which was
60817generated by GNU Autoconf 2.69.  Invocation command line was
60818
60819  CONFIG_FILES    = $CONFIG_FILES
60820  CONFIG_HEADERS  = $CONFIG_HEADERS
60821  CONFIG_LINKS    = $CONFIG_LINKS
60822  CONFIG_COMMANDS = $CONFIG_COMMANDS
60823  $ $0 $@
60824
60825on `(hostname || uname -n) 2>/dev/null | sed 1q`
60826"
60827
60828_ACEOF
60829
60830case $ac_config_files in *"
60831"*) set x $ac_config_files; shift; ac_config_files=$*;;
60832esac
60833
60834
60835
60836cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60837# Files that config.status was made for.
60838config_files="$ac_config_files"
60839
60840_ACEOF
60841
60842cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60843ac_cs_usage="\
60844\`$as_me' instantiates files and other configuration actions
60845from templates according to the current configuration.  Unless the files
60846and actions are specified as TAGs, all are instantiated by default.
60847
60848Usage: $0 [OPTION]... [TAG]...
60849
60850  -h, --help       print this help, then exit
60851  -V, --version    print version number and configuration settings, then exit
60852      --config     print configuration, then exit
60853  -q, --quiet, --silent
60854                   do not print progress messages
60855  -d, --debug      don't remove temporary files
60856      --recheck    update $as_me by reconfiguring in the same conditions
60857      --file=FILE[:TEMPLATE]
60858                   instantiate the configuration file FILE
60859
60860Configuration files:
60861$config_files
60862
60863Report bugs to <build-dev@openjdk.java.net>.
60864OpenJDK home page: <http://openjdk.java.net>."
60865
60866_ACEOF
60867cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60868ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
60869ac_cs_version="\\
60870OpenJDK config.status jdk9
60871configured by $0, generated by GNU Autoconf 2.69,
60872  with options \\"\$ac_cs_config\\"
60873
60874Copyright (C) 2012 Free Software Foundation, Inc.
60875This config.status script is free software; the Free Software Foundation
60876gives unlimited permission to copy, distribute and modify it."
60877
60878ac_pwd='$ac_pwd'
60879srcdir='$srcdir'
60880AWK='$AWK'
60881test -n "\$AWK" || AWK=awk
60882_ACEOF
60883
60884cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60885# The default lists apply if the user does not specify any file.
60886ac_need_defaults=:
60887while test $# != 0
60888do
60889  case $1 in
60890  --*=?*)
60891    ac_option=`expr "X$1" : 'X\([^=]*\)='`
60892    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
60893    ac_shift=:
60894    ;;
60895  --*=)
60896    ac_option=`expr "X$1" : 'X\([^=]*\)='`
60897    ac_optarg=
60898    ac_shift=:
60899    ;;
60900  *)
60901    ac_option=$1
60902    ac_optarg=$2
60903    ac_shift=shift
60904    ;;
60905  esac
60906
60907  case $ac_option in
60908  # Handling of the options.
60909  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
60910    ac_cs_recheck=: ;;
60911  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
60912    $as_echo "$ac_cs_version"; exit ;;
60913  --config | --confi | --conf | --con | --co | --c )
60914    $as_echo "$ac_cs_config"; exit ;;
60915  --debug | --debu | --deb | --de | --d | -d )
60916    debug=: ;;
60917  --file | --fil | --fi | --f )
60918    $ac_shift
60919    case $ac_optarg in
60920    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
60921    '') as_fn_error $? "missing file argument" ;;
60922    esac
60923    as_fn_append CONFIG_FILES " '$ac_optarg'"
60924    ac_need_defaults=false;;
60925  --he | --h |  --help | --hel | -h )
60926    $as_echo "$ac_cs_usage"; exit ;;
60927  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
60928  | -silent | --silent | --silen | --sile | --sil | --si | --s)
60929    ac_cs_silent=: ;;
60930
60931  # This is an error.
60932  -*) as_fn_error $? "unrecognized option: \`$1'
60933Try \`$0 --help' for more information." ;;
60934
60935  *) as_fn_append ac_config_targets " $1"
60936     ac_need_defaults=false ;;
60937
60938  esac
60939  shift
60940done
60941
60942ac_configure_extra_args=
60943
60944if $ac_cs_silent; then
60945  exec 6>/dev/null
60946  ac_configure_extra_args="$ac_configure_extra_args --silent"
60947fi
60948
60949_ACEOF
60950cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60951if \$ac_cs_recheck; then
60952  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
60953  shift
60954  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
60955  CONFIG_SHELL='$SHELL'
60956  export CONFIG_SHELL
60957  exec "\$@"
60958fi
60959
60960_ACEOF
60961cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60962exec 5>>config.log
60963{
60964  echo
60965  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
60966## Running $as_me. ##
60967_ASBOX
60968  $as_echo "$ac_log"
60969} >&5
60970
60971_ACEOF
60972cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60973_ACEOF
60974
60975cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60976
60977# Handling of arguments.
60978for ac_config_target in $ac_config_targets
60979do
60980  case $ac_config_target in
60981    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
60982    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
60983    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
60984    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
60985    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
60986
60987  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
60988  esac
60989done
60990
60991
60992# If the user did not use the arguments to specify the items to instantiate,
60993# then the envvar interface is used.  Set only those that are not.
60994# We use the long form for the default assignment because of an extremely
60995# bizarre bug on SunOS 4.1.3.
60996if $ac_need_defaults; then
60997  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
60998fi
60999
61000# Have a temporary directory for convenience.  Make it in the build tree
61001# simply because there is no reason against having it here, and in addition,
61002# creating and moving files from /tmp can sometimes cause problems.
61003# Hook for its removal unless debugging.
61004# Note that there is a small window in which the directory will not be cleaned:
61005# after its creation but before its name has been assigned to `$tmp'.
61006$debug ||
61007{
61008  tmp= ac_tmp=
61009  trap 'exit_status=$?
61010  : "${ac_tmp:=$tmp}"
61011  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
61012' 0
61013  trap 'as_fn_exit 1' 1 2 13 15
61014}
61015# Create a (secure) tmp directory for tmp files.
61016
61017{
61018  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
61019  test -d "$tmp"
61020}  ||
61021{
61022  tmp=./conf$$-$RANDOM
61023  (umask 077 && mkdir "$tmp")
61024} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
61025ac_tmp=$tmp
61026
61027# Set up the scripts for CONFIG_FILES section.
61028# No need to generate them if there are no CONFIG_FILES.
61029# This happens for instance with `./config.status config.h'.
61030if test -n "$CONFIG_FILES"; then
61031
61032
61033ac_cr=`echo X | tr X '\015'`
61034# On cygwin, bash can eat \r inside `` if the user requested igncr.
61035# But we know of no other shell where ac_cr would be empty at this
61036# point, so we can use a bashism as a fallback.
61037if test "x$ac_cr" = x; then
61038  eval ac_cr=\$\'\\r\'
61039fi
61040ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
61041if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
61042  ac_cs_awk_cr='\\r'
61043else
61044  ac_cs_awk_cr=$ac_cr
61045fi
61046
61047echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
61048_ACEOF
61049
61050
61051{
61052  echo "cat >conf$$subs.awk <<_ACEOF" &&
61053  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
61054  echo "_ACEOF"
61055} >conf$$subs.sh ||
61056  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61057ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
61058ac_delim='%!_!# '
61059for ac_last_try in false false false false false :; do
61060  . ./conf$$subs.sh ||
61061    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61062
61063  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
61064  if test $ac_delim_n = $ac_delim_num; then
61065    break
61066  elif $ac_last_try; then
61067    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61068  else
61069    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
61070  fi
61071done
61072rm -f conf$$subs.sh
61073
61074cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61075cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
61076_ACEOF
61077sed -n '
61078h
61079s/^/S["/; s/!.*/"]=/
61080p
61081g
61082s/^[^!]*!//
61083:repl
61084t repl
61085s/'"$ac_delim"'$//
61086t delim
61087:nl
61088h
61089s/\(.\{148\}\)..*/\1/
61090t more1
61091s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
61092p
61093n
61094b repl
61095:more1
61096s/["\\]/\\&/g; s/^/"/; s/$/"\\/
61097p
61098g
61099s/.\{148\}//
61100t nl
61101:delim
61102h
61103s/\(.\{148\}\)..*/\1/
61104t more2
61105s/["\\]/\\&/g; s/^/"/; s/$/"/
61106p
61107b
61108:more2
61109s/["\\]/\\&/g; s/^/"/; s/$/"\\/
61110p
61111g
61112s/.\{148\}//
61113t delim
61114' <conf$$subs.awk | sed '
61115/^[^""]/{
61116  N
61117  s/\n//
61118}
61119' >>$CONFIG_STATUS || ac_write_fail=1
61120rm -f conf$$subs.awk
61121cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61122_ACAWK
61123cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
61124  for (key in S) S_is_set[key] = 1
61125  FS = ""
61126
61127}
61128{
61129  line = $ 0
61130  nfields = split(line, field, "@")
61131  substed = 0
61132  len = length(field[1])
61133  for (i = 2; i < nfields; i++) {
61134    key = field[i]
61135    keylen = length(key)
61136    if (S_is_set[key]) {
61137      value = S[key]
61138      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
61139      len += length(value) + length(field[++i])
61140      substed = 1
61141    } else
61142      len += 1 + keylen
61143  }
61144
61145  print line
61146}
61147
61148_ACAWK
61149_ACEOF
61150cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61151if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
61152  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
61153else
61154  cat
61155fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
61156  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
61157_ACEOF
61158
61159# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
61160# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
61161# trailing colons and then remove the whole line if VPATH becomes empty
61162# (actually we leave an empty line to preserve line numbers).
61163if test "x$srcdir" = x.; then
61164  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
61165h
61166s///
61167s/^/:/
61168s/[	 ]*$/:/
61169s/:\$(srcdir):/:/g
61170s/:\${srcdir}:/:/g
61171s/:@srcdir@:/:/g
61172s/^:*//
61173s/:*$//
61174x
61175s/\(=[	 ]*\).*/\1/
61176G
61177s/\n//
61178s/^[^=]*=[	 ]*$//
61179}'
61180fi
61181
61182cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61183fi # test -n "$CONFIG_FILES"
61184
61185
61186eval set X "  :F $CONFIG_FILES      "
61187shift
61188for ac_tag
61189do
61190  case $ac_tag in
61191  :[FHLC]) ac_mode=$ac_tag; continue;;
61192  esac
61193  case $ac_mode$ac_tag in
61194  :[FHL]*:*);;
61195  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
61196  :[FH]-) ac_tag=-:-;;
61197  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
61198  esac
61199  ac_save_IFS=$IFS
61200  IFS=:
61201  set x $ac_tag
61202  IFS=$ac_save_IFS
61203  shift
61204  ac_file=$1
61205  shift
61206
61207  case $ac_mode in
61208  :L) ac_source=$1;;
61209  :[FH])
61210    ac_file_inputs=
61211    for ac_f
61212    do
61213      case $ac_f in
61214      -) ac_f="$ac_tmp/stdin";;
61215      *) # Look for the file first in the build tree, then in the source tree
61216	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
61217	 # because $ac_f cannot contain `:'.
61218	 test -f "$ac_f" ||
61219	   case $ac_f in
61220	   [\\/$]*) false;;
61221	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
61222	   esac ||
61223	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
61224      esac
61225      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
61226      as_fn_append ac_file_inputs " '$ac_f'"
61227    done
61228
61229    # Let's still pretend it is `configure' which instantiates (i.e., don't
61230    # use $as_me), people would be surprised to read:
61231    #    /* config.h.  Generated by config.status.  */
61232    configure_input='Generated from '`
61233	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
61234	`' by configure.'
61235    if test x"$ac_file" != x-; then
61236      configure_input="$ac_file.  $configure_input"
61237      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
61238$as_echo "$as_me: creating $ac_file" >&6;}
61239    fi
61240    # Neutralize special characters interpreted by sed in replacement strings.
61241    case $configure_input in #(
61242    *\&* | *\|* | *\\* )
61243       ac_sed_conf_input=`$as_echo "$configure_input" |
61244       sed 's/[\\\\&|]/\\\\&/g'`;; #(
61245    *) ac_sed_conf_input=$configure_input;;
61246    esac
61247
61248    case $ac_tag in
61249    *:-:* | *:-) cat >"$ac_tmp/stdin" \
61250      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
61251    esac
61252    ;;
61253  esac
61254
61255  ac_dir=`$as_dirname -- "$ac_file" ||
61256$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
61257	 X"$ac_file" : 'X\(//\)[^/]' \| \
61258	 X"$ac_file" : 'X\(//\)$' \| \
61259	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
61260$as_echo X"$ac_file" |
61261    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
61262	    s//\1/
61263	    q
61264	  }
61265	  /^X\(\/\/\)[^/].*/{
61266	    s//\1/
61267	    q
61268	  }
61269	  /^X\(\/\/\)$/{
61270	    s//\1/
61271	    q
61272	  }
61273	  /^X\(\/\).*/{
61274	    s//\1/
61275	    q
61276	  }
61277	  s/.*/./; q'`
61278  as_dir="$ac_dir"; as_fn_mkdir_p
61279  ac_builddir=.
61280
61281case "$ac_dir" in
61282.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
61283*)
61284  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
61285  # A ".." for each directory in $ac_dir_suffix.
61286  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
61287  case $ac_top_builddir_sub in
61288  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
61289  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
61290  esac ;;
61291esac
61292ac_abs_top_builddir=$ac_pwd
61293ac_abs_builddir=$ac_pwd$ac_dir_suffix
61294# for backward compatibility:
61295ac_top_builddir=$ac_top_build_prefix
61296
61297case $srcdir in
61298  .)  # We are building in place.
61299    ac_srcdir=.
61300    ac_top_srcdir=$ac_top_builddir_sub
61301    ac_abs_top_srcdir=$ac_pwd ;;
61302  [\\/]* | ?:[\\/]* )  # Absolute name.
61303    ac_srcdir=$srcdir$ac_dir_suffix;
61304    ac_top_srcdir=$srcdir
61305    ac_abs_top_srcdir=$srcdir ;;
61306  *) # Relative name.
61307    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
61308    ac_top_srcdir=$ac_top_build_prefix$srcdir
61309    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
61310esac
61311ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
61312
61313
61314  case $ac_mode in
61315  :F)
61316  #
61317  # CONFIG_FILE
61318  #
61319
61320_ACEOF
61321
61322cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61323# If the template does not know about datarootdir, expand it.
61324# FIXME: This hack should be removed a few years after 2.60.
61325ac_datarootdir_hack=; ac_datarootdir_seen=
61326ac_sed_dataroot='
61327/datarootdir/ {
61328  p
61329  q
61330}
61331/@datadir@/p
61332/@docdir@/p
61333/@infodir@/p
61334/@localedir@/p
61335/@mandir@/p'
61336case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
61337*datarootdir*) ac_datarootdir_seen=yes;;
61338*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
61339  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
61340$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
61341_ACEOF
61342cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61343  ac_datarootdir_hack='
61344  s&@datadir@&$datadir&g
61345  s&@docdir@&$docdir&g
61346  s&@infodir@&$infodir&g
61347  s&@localedir@&$localedir&g
61348  s&@mandir@&$mandir&g
61349  s&\\\${datarootdir}&$datarootdir&g' ;;
61350esac
61351_ACEOF
61352
61353# Neutralize VPATH when `$srcdir' = `.'.
61354# Shell code in configure.ac might set extrasub.
61355# FIXME: do we really want to maintain this feature?
61356cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61357ac_sed_extra="$ac_vpsub
61358$extrasub
61359_ACEOF
61360cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61361:t
61362/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
61363s|@configure_input@|$ac_sed_conf_input|;t t
61364s&@top_builddir@&$ac_top_builddir_sub&;t t
61365s&@top_build_prefix@&$ac_top_build_prefix&;t t
61366s&@srcdir@&$ac_srcdir&;t t
61367s&@abs_srcdir@&$ac_abs_srcdir&;t t
61368s&@top_srcdir@&$ac_top_srcdir&;t t
61369s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
61370s&@builddir@&$ac_builddir&;t t
61371s&@abs_builddir@&$ac_abs_builddir&;t t
61372s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
61373$ac_datarootdir_hack
61374"
61375eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
61376  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61377
61378test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
61379  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
61380  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
61381      "$ac_tmp/out"`; test -z "$ac_out"; } &&
61382  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61383which seems to be undefined.  Please make sure it is defined" >&5
61384$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61385which seems to be undefined.  Please make sure it is defined" >&2;}
61386
61387  rm -f "$ac_tmp/stdin"
61388  case $ac_file in
61389  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
61390  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
61391  esac \
61392  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61393 ;;
61394
61395
61396
61397  esac
61398
61399done # for ac_tag
61400
61401
61402as_fn_exit 0
61403_ACEOF
61404ac_clean_files=$ac_clean_files_save
61405
61406test $ac_write_fail = 0 ||
61407  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
61408
61409
61410# configure is writing to config.log, and then calls config.status.
61411# config.status does its own redirection, appending to config.log.
61412# Unfortunately, on DOS this fails, as config.log is still kept open
61413# by configure, so config.status won't be able to write to it; its
61414# output is simply discarded.  So we exec the FD to /dev/null,
61415# effectively closing config.log, so it can be properly (re)opened and
61416# appended to by config.status.  When coming back to configure, we
61417# need to make the FD available again.
61418if test "$no_create" != yes; then
61419  ac_cs_success=:
61420  ac_config_status_args=
61421  test "$silent" = yes &&
61422    ac_config_status_args="$ac_config_status_args --quiet"
61423  exec 5>/dev/null
61424  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
61425  exec 5>>config.log
61426  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
61427  # would make configure fail if this is the last instruction.
61428  $ac_cs_success || as_fn_exit 1
61429fi
61430if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
61431  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
61432$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
61433fi
61434
61435
61436# After AC_OUTPUT, we need to do final work
61437
61438
61439  # Try to move config.log (generated by autoconf) to the configure-support directory.
61440  if test -e ./config.log; then
61441    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
61442  fi
61443
61444  # Rotate our log file (configure.log)
61445  if test -e "$OUTPUT_ROOT/configure.log.old"; then
61446    $RM -f "$OUTPUT_ROOT/configure.log.old"
61447  fi
61448  if test -e "$OUTPUT_ROOT/configure.log"; then
61449    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
61450  fi
61451
61452  # Move configure.log from current directory to the build output root
61453  if test -e ./configure.log; then
61454    echo found it
61455    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
61456  fi
61457
61458  # Make the compare script executable
61459  $CHMOD +x $OUTPUT_ROOT/compare.sh
61460
61461
61462# Finally output some useful information to the user
61463
61464  # Finally output some useful information to the user
61465
61466  printf "\n"
61467  printf "====================================================\n"
61468  if test "x$no_create" != "xyes"; then
61469    if test "x$IS_RECONFIGURE" != "xyes"; then
61470      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
61471    else
61472      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
61473    fi
61474  else
61475    if test "x$IS_RECONFIGURE" != "xyes"; then
61476      printf "A configuration has been successfully checked but not created\n"
61477    else
61478      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
61479    fi
61480  fi
61481  if test "x$CONFIGURE_COMMAND_LINE" != x; then
61482    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
61483  else
61484    printf "using default settings.\n"
61485  fi
61486
61487  printf "\n"
61488  printf "Configuration summary:\n"
61489  printf "* Debug level:    $DEBUG_LEVEL\n"
61490  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
61491  printf "* JDK variant:    $JDK_VARIANT\n"
61492  printf "* JVM variants:   $with_jvm_variants\n"
61493  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
61494  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
61495
61496  printf "\n"
61497  printf "Tools summary:\n"
61498  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
61499    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
61500  fi
61501  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
61502  if test "x$TOOLCHAIN_VERSION" != "x"; then
61503    print_version=" $TOOLCHAIN_VERSION"
61504  fi
61505  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
61506  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
61507  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
61508
61509  printf "\n"
61510  printf "Build performance summary:\n"
61511  printf "* Cores to use:   $JOBS\n"
61512  printf "* Memory limit:   $MEMORY_SIZE MB\n"
61513  if test "x$CCACHE_STATUS" != "x"; then
61514    printf "* ccache status:  $CCACHE_STATUS\n"
61515  fi
61516  printf "\n"
61517
61518  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
61519    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
61520    printf "will result in longer build times.\n"
61521    printf "\n"
61522  fi
61523
61524  if test "x$FOUND_ALT_VARIABLES" != "x"; then
61525    printf "WARNING: You have old-style ALT_ environment variables set.\n"
61526    printf "These are not respected, and will be ignored. It is recommended\n"
61527    printf "that you clean your environment. The following variables are set:\n"
61528    printf "$FOUND_ALT_VARIABLES\n"
61529    printf "\n"
61530  fi
61531
61532  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
61533    printf "WARNING: Your build output directory is not on a local disk.\n"
61534    printf "This will severely degrade build performance!\n"
61535    printf "It is recommended that you create an output directory on a local disk,\n"
61536    printf "and run the configure script again from that directory.\n"
61537    printf "\n"
61538  fi
61539
61540  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
61541    printf "WARNING: The result of this configuration has overridden an older\n"
61542    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
61543    printf "proper build. Failure to do so might result in strange build problems.\n"
61544    printf "\n"
61545  fi
61546
61547  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
61548    printf "WARNING: The result of this configuration was not saved.\n"
61549    printf "You should run without '--no-create | -n' to create the configuration.\n"
61550    printf "\n"
61551  fi
61552
61553
61554
61555  # Locate config.log.
61556  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
61557    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
61558  elif test -e "./config.log"; then
61559    CONFIG_LOG_PATH="."
61560  fi
61561
61562  if test -e "$CONFIG_LOG_PATH/config.log"; then
61563    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
61564    if test $? -eq 0; then
61565      printf "The following warnings were produced. Repeated here for convenience:\n"
61566      # We must quote sed expression (using []) to stop m4 from eating the [].
61567      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
61568      printf "\n"
61569    fi
61570  fi
61571
61572